mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #34051 -- Made makemigrations --check exit before making migrations.
This commit is contained in:
committed by
Mariusz Felisiak
parent
5d36a8266c
commit
80d38de52b
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user