summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJacob Walls <jacobtylerwalls@gmail.com>2021-06-10 11:15:32 -0400
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2021-06-11 09:35:42 +0200
commit2dfc1066a0d31c7e443e1c7b8590b101a645bf2d (patch)
tree96e70e3fdd8cee951265f795b05354a2ea24c7e3 /tests
parentde4f6201835043ba664e8dcbdceffc4b0955ce29 (diff)
Fixed #25250 -- Clarified partially recorded state of squashed migrations in showmigrations --list.
Diffstat (limited to 'tests')
-rw-r--r--tests/migrations/test_commands.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/migrations/test_commands.py b/tests/migrations/test_commands.py
index b253192a56..b0cb0bb0b6 100644
--- a/tests/migrations/test_commands.py
+++ b/tests/migrations/test_commands.py
@@ -929,6 +929,15 @@ class MigrateTests(MigrationTestBase):
recorder.record_applied("migrations", "0001_initial")
recorder.record_applied("migrations", "0002_second")
out = io.StringIO()
+ call_command('showmigrations', 'migrations', stdout=out, no_color=True)
+ self.assertEqual(
+ "migrations\n"
+ " [-] 0001_squashed_0002 (2 squashed migrations) "
+ "run 'manage.py migrate' to finish recording.\n",
+ out.getvalue().lower(),
+ )
+
+ out = io.StringIO()
call_command("migrate", "migrations", verbosity=0)
call_command("showmigrations", "migrations", stdout=out, no_color=True)
self.assertEqual(