mirror of
https://github.com/django/django.git
synced 2025-11-25 21:22:14 +00:00
Refs #27787 -- Corrected or removed invalid call_command() options.
This commit is contained in:
parent
874b1f2cac
commit
f6800a081a
3 changed files with 11 additions and 19 deletions
6
tests/fixtures/tests.py
vendored
6
tests/fixtures/tests.py
vendored
|
|
@ -592,8 +592,8 @@ class FixtureLoadingTests(DumpDataAssertMixin, TestCase):
|
|||
|
||||
def test_loading_using(self):
|
||||
# Load db fixtures 1 and 2. These will load using the 'default' database identifier explicitly
|
||||
management.call_command('loaddata', 'db_fixture_1', verbosity=0, using='default')
|
||||
management.call_command('loaddata', 'db_fixture_2', verbosity=0, using='default')
|
||||
management.call_command('loaddata', 'db_fixture_1', verbosity=0, database='default')
|
||||
management.call_command('loaddata', 'db_fixture_2', verbosity=0, database='default')
|
||||
self.assertQuerysetEqual(Article.objects.all(), [
|
||||
'<Article: Who needs more than one database?>',
|
||||
'<Article: Who needs to use compressed data?>',
|
||||
|
|
@ -604,7 +604,7 @@ class FixtureLoadingTests(DumpDataAssertMixin, TestCase):
|
|||
with self.assertRaisesMessage(CommandError, "No fixture named 'db_fixture_3' found."):
|
||||
management.call_command('loaddata', 'db_fixture_3', verbosity=0)
|
||||
with self.assertRaisesMessage(CommandError, "No fixture named 'db_fixture_3' found."):
|
||||
management.call_command('loaddata', 'db_fixture_3', verbosity=0, using='default')
|
||||
management.call_command('loaddata', 'db_fixture_3', verbosity=0, database='default')
|
||||
self.assertQuerysetEqual(Article.objects.all(), [])
|
||||
|
||||
def test_output_formats(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue