mirror of
https://github.com/django/django.git
synced 2025-02-28 19:44:35 +00:00
Added ModelState.from_model() test for abstract model with unnamed indexes.
This commit is contained in:
parent
8dbfef4695
commit
1c11dba835
@ -1856,8 +1856,11 @@ class ModelStateTests(SimpleTestCase):
|
||||
class Child2(Abstract):
|
||||
pass
|
||||
|
||||
abstract_state = ModelState.from_model(Abstract)
|
||||
child1_state = ModelState.from_model(Child1)
|
||||
child2_state = ModelState.from_model(Child2)
|
||||
index_names = [index.name for index in abstract_state.options["indexes"]]
|
||||
self.assertEqual(index_names, ["migrations__name_ae16a4_idx"])
|
||||
index_names = [index.name for index in child1_state.options["indexes"]]
|
||||
self.assertEqual(index_names, ["migrations__name_b0afd7_idx"])
|
||||
index_names = [index.name for index in child2_state.options["indexes"]]
|
||||
|
Loading…
x
Reference in New Issue
Block a user