mirror of https://github.com/django/django.git
Refs #33119 -- Added tests for changing model name case referenced by ManyToManyField.
Fixed in aa4acc164d
.
This commit is contained in:
parent
e441847eca
commit
b8f3a3ad54
|
@ -1074,6 +1074,19 @@ class AutodetectorTests(TestCase):
|
|||
self.assertNumberMigrations(changes, 'testapp', 0)
|
||||
self.assertNumberMigrations(changes, 'otherapp', 0)
|
||||
|
||||
def test_renamed_referenced_m2m_model_case(self):
|
||||
publisher_renamed = ModelState('testapp', 'publisher', [
|
||||
('id', models.AutoField(primary_key=True)),
|
||||
('name', models.CharField(max_length=100)),
|
||||
])
|
||||
changes = self.get_changes(
|
||||
[self.publisher, self.author_with_m2m],
|
||||
[publisher_renamed, self.author_with_m2m],
|
||||
questioner=MigrationQuestioner({'ask_rename_model': True}),
|
||||
)
|
||||
self.assertNumberMigrations(changes, 'testapp', 0)
|
||||
self.assertNumberMigrations(changes, 'otherapp', 0)
|
||||
|
||||
def test_rename_m2m_through_model(self):
|
||||
"""
|
||||
Tests autodetection of renamed models that are used in M2M relations as
|
||||
|
|
Loading…
Reference in New Issue