mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Included reverse deps in showmigrations
This commit is contained in:
committed by
Markus Holtermann
parent
509379a161
commit
c8df17b612
@@ -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()
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user