summaryrefslogtreecommitdiff
path: root/tests/migrations
diff options
context:
space:
mode:
authorJacob Walls <jacobtylerwalls@gmail.com>2022-09-25 19:53:55 -0400
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-09-28 09:48:07 +0200
commit80d38de52bb2721a7b44fce4057bcff571afc23a (patch)
treeb05b28720b554ff754c37b118c15dc2e44a480c1 /tests/migrations
parent5d36a8266c7d5d1994d7a7eeb4016f80d9cb0401 (diff)
downloaddjango-80d38de52bb2721a7b44fce4057bcff571afc23a.tar.gz
Fixed #34051 -- Made makemigrations --check exit before making migrations.
Diffstat (limited to 'tests/migrations')
-rw-r--r--tests/migrations/test_commands.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/migrations/test_commands.py b/tests/migrations/test_commands.py
index 9900c7a35d..0117d1e4aa 100644
--- a/tests/migrations/test_commands.py
+++ b/tests/migrations/test_commands.py
@@ -2391,9 +2391,10 @@ class MakeMigrationsTests(MigrationTestBase):
makemigrations --check should exit with a non-zero status when
there are changes to an app requiring migrations.
"""
- with self.temporary_migration_module():
+ with self.temporary_migration_module() as tmpdir:
with self.assertRaises(SystemExit):
call_command("makemigrations", "--check", "migrations", verbosity=0)
+ self.assertFalse(os.path.exists(tmpdir))
with self.temporary_migration_module(
module="migrations.test_migrations_no_changes"