mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Included reverse deps in showmigrations
This commit is contained in:
parent
509379a161
commit
c8df17b612
2 changed files with 23 additions and 22 deletions
|
@ -228,39 +228,38 @@ class MigrateTests(MigrationTestBase):
|
|||
"""
|
||||
out = six.StringIO()
|
||||
call_command("showmigrations", format='plan', stdout=out)
|
||||
self.assertIn(
|
||||
self.assertEqual(
|
||||
"[ ] migrations.0001_initial\n"
|
||||
"[ ] migrations.0003_third\n"
|
||||
"[ ] migrations.0002_second",
|
||||
"[ ] migrations.0002_second\n",
|
||||
out.getvalue().lower()
|
||||
)
|
||||
|
||||
out = six.StringIO()
|
||||
call_command("showmigrations", format='plan', stdout=out, verbosity=2)
|
||||
self.assertIn(
|
||||
self.assertEqual(
|
||||
"[ ] migrations.0001_initial\n"
|
||||
"[ ] migrations.0003_third ... (migrations.0001_initial)\n"
|
||||
"[ ] migrations.0002_second ... (migrations.0001_initial)",
|
||||
"[ ] migrations.0002_second ... (migrations.0001_initial, migrations.0003_third)\n",
|
||||
out.getvalue().lower()
|
||||
)
|
||||
|
||||
call_command("migrate", "migrations", "0003", verbosity=0)
|
||||
|
||||
out = six.StringIO()
|
||||
call_command("showmigrations", format='plan', stdout=out)
|
||||
self.assertIn(
|
||||
self.assertEqual(
|
||||
"[x] migrations.0001_initial\n"
|
||||
"[x] migrations.0003_third\n"
|
||||
"[ ] migrations.0002_second",
|
||||
"[ ] migrations.0002_second\n",
|
||||
out.getvalue().lower()
|
||||
)
|
||||
|
||||
out = six.StringIO()
|
||||
call_command("showmigrations", format='plan', stdout=out, verbosity=2)
|
||||
self.assertIn(
|
||||
self.assertEqual(
|
||||
"[x] migrations.0001_initial\n"
|
||||
"[x] migrations.0003_third ... (migrations.0001_initial)\n"
|
||||
"[ ] migrations.0002_second ... (migrations.0001_initial)",
|
||||
"[ ] migrations.0002_second ... (migrations.0001_initial, migrations.0003_third)\n",
|
||||
out.getvalue().lower()
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue