From c4e372aaf467ae41315cfe56a718a80469fc5318 Mon Sep 17 00:00:00 2001 From: Simon Charette Date: Mon, 14 Dec 2015 01:20:10 -0500 Subject: Fixed #25852 -- Made sure AlterModelManager forces a reload of its model state. Thanks to Geoffrey Sechter and the Django NYC group for the report and Markus for the review. --- tests/migrations/test_operations.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests') diff --git a/tests/migrations/test_operations.py b/tests/migrations/test_operations.py index 51d4d5bbbb..b624a73392 100644 --- a/tests/migrations/test_operations.py +++ b/tests/migrations/test_operations.py @@ -1393,6 +1393,11 @@ class OperationTests(OperationTestBase): self.assertEqual(managers[2][0], "food_mgr_kwargs") self.assertIsInstance(managers[2][1], FoodManager) self.assertEqual(managers[2][1].args, ("x", "y", 3, 4)) + rendered_state = new_state.apps + model = rendered_state.get_model('test_almoma', 'pony') + self.assertIsInstance(model.food_qs, models.Manager) + self.assertIsInstance(model.food_mgr, FoodManager) + self.assertIsInstance(model.food_mgr_kwargs, FoodManager) def test_alter_model_managers_emptying(self): """ -- cgit v1.3