diff --git a/django/test/testcases.py b/django/test/testcases.py
index b90fafa..5d265a5 100644
a
|
b
|
class TransactionTestCase(SimpleTestCase):
|
699 | 699 | # Subclasses can enable only a subset of apps for faster tests |
700 | 700 | available_apps = None |
701 | 701 | |
| 702 | # Subclasses can define fixtures which will be automatically installed |
| 703 | fixtures = None |
| 704 | |
702 | 705 | def _pre_setup(self): |
703 | 706 | """Performs any pre-test setup. This includes: |
704 | 707 | |
… |
… |
class TransactionTestCase(SimpleTestCase):
|
746 | 749 | if self.reset_sequences: |
747 | 750 | self._reset_sequences(db_name) |
748 | 751 | |
749 | | if hasattr(self, 'fixtures'): |
750 | | # We have to use this slightly awkward syntax due to the fact |
751 | | # that we're using *args and **kwargs together. |
752 | | call_command('loaddata', *self.fixtures, |
753 | | **{'verbosity': 0, 'database': db_name, 'skip_validation': True}) |
| 752 | if self.fixtures: |
| 753 | call_command('loaddata', *self.fixtures, verbosity=0, |
| 754 | database=db_name, skip_validation=True) |
754 | 755 | |
755 | 756 | def _post_teardown(self): |
756 | 757 | """Performs any post-test things. This includes: |
… |
… |
class TestCase(TransactionTestCase):
|
838 | 839 | disable_transaction_methods() |
839 | 840 | |
840 | 841 | for db_name in self._databases_names(include_mirrors=False): |
841 | | if hasattr(self, 'fixtures'): |
| 842 | if self.fixtures: |
842 | 843 | try: |
843 | 844 | call_command('loaddata', *self.fixtures, |
844 | | **{ |
845 | | 'verbosity': 0, |
846 | | 'commit': False, |
847 | | 'database': db_name, |
848 | | 'skip_validation': True, |
849 | | }) |
| 845 | verbosity=0, |
| 846 | commit=False, |
| 847 | database=db_name, |
| 848 | skip_validation=True, |
| 849 | ) |
850 | 850 | except Exception: |
851 | 851 | self._fixture_teardown() |
852 | 852 | raise |