mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Added ModelState.from_model() test for abstract model with unnamed indexes.
This commit is contained in:
		| @@ -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"]] | ||||
|   | ||||
		Reference in New Issue
	
	Block a user