mirror of
https://github.com/django/django.git
synced 2025-06-05 11:39:13 +00:00
Refs #33119 -- Added tests for changing model name case referenced by ManyToManyField.
Fixed in aa4acc164d1247c0de515c959f7b09648b57dc42.
This commit is contained in:
parent
e441847eca
commit
b8f3a3ad54
@ -1074,6 +1074,19 @@ class AutodetectorTests(TestCase):
|
|||||||
self.assertNumberMigrations(changes, 'testapp', 0)
|
self.assertNumberMigrations(changes, 'testapp', 0)
|
||||||
self.assertNumberMigrations(changes, 'otherapp', 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):
|
def test_rename_m2m_through_model(self):
|
||||||
"""
|
"""
|
||||||
Tests autodetection of renamed models that are used in M2M relations as
|
Tests autodetection of renamed models that are used in M2M relations as
|
||||||
|
Loading…
x
Reference in New Issue
Block a user