diff --git a/django/core/management/commands/loaddata.py b/django/core/management/commands/loaddata.py
index 8bf89c9..31a011a 100644
a
|
b
|
class Command(BaseCommand):
|
91 | 91 | app_module_paths.append(app.__file__) |
92 | 92 | |
93 | 93 | app_fixtures = [os.path.join(os.path.dirname(path), 'fixtures') for path in app_module_paths] |
| 94 | multi_db = options.get('multi_db', False) |
94 | 95 | for fixture_label in fixture_labels: |
95 | 96 | parts = fixture_label.split('.') |
96 | 97 | |
… |
… |
class Command(BaseCommand):
|
189 | 190 | # If the fixture we loaded contains 0 objects, assume that an |
190 | 191 | # error was encountered during fixture loading. |
191 | 192 | if objects_in_fixture == 0: |
| 193 | if multi_db: |
| 194 | continue |
| 195 | |
192 | 196 | sys.stderr.write( |
193 | 197 | self.style.ERROR("No fixture data found for '%s'. (File format may be invalid.)\n" % |
194 | 198 | (fixture_name))) |
diff --git a/django/test/testcases.py b/django/test/testcases.py
index 10bd6c6..0e6613b 100644
a
|
b
|
class TestCase(TransactionTestCase):
|
491 | 491 | |
492 | 492 | # If the test case has a multi_db=True flag, setup all databases. |
493 | 493 | # Otherwise, just use default. |
494 | | if getattr(self, 'multi_db', False): |
| 494 | multi_db = getattr(self, 'multi_db', False) |
| 495 | if multi_db: |
495 | 496 | databases = connections |
496 | 497 | else: |
497 | 498 | databases = [DEFAULT_DB_ALIAS] |
… |
… |
class TestCase(TransactionTestCase):
|
509 | 510 | call_command('loaddata', *self.fixtures, **{ |
510 | 511 | 'verbosity': 0, |
511 | 512 | 'commit': False, |
512 | | 'database': db |
| 513 | 'database': db, |
| 514 | 'multi_db': multi_db, |
513 | 515 | }) |
514 | 516 | |
515 | 517 | def _fixture_teardown(self): |