mirror of
https://github.com/django/django.git
synced 2025-12-04 00:55:36 +00:00
Fixed #27200 -- Provided makemigration's allow_migrate() with model_name.
This commit is contained in:
parent
51b83d9e51
commit
cd09524f27
3 changed files with 10 additions and 4 deletions
|
|
@ -638,7 +638,7 @@ class MakeMigrationsTests(MigrationTestBase):
|
|||
with self.settings(DATABASE_ROUTERS=['migrations.routers.TestRouter']):
|
||||
with mock.patch.object(TestRouter, 'allow_migrate', return_value=False) as allow_migrate:
|
||||
call_command('makemigrations', 'migrations', verbosity=0)
|
||||
allow_migrate.assert_called_with('other', 'migrations')
|
||||
allow_migrate.assert_called_with('other', 'migrations', model_name='UnicodeModel')
|
||||
self.assertEqual(ensure_schema.call_count, 4)
|
||||
|
||||
def test_failing_migration(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue