summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSimon Charette <charette.s@gmail.com>2015-12-14 01:20:10 -0500
committerSimon Charette <charette.s@gmail.com>2015-12-15 14:55:05 -0500
commit4b02b433b75d457552ee37e519afe6c83f261d44 (patch)
tree449b9c770723fd89dfd0f0bb7506d91d9e9bf076 /tests
parentc0c2c7ecd6780b1207b18d96a60c807dbb98eb81 (diff)
[1.8.x] 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. Backport of c4e372aaf467ae41315cfe56a718a80469fc5318 from master
Diffstat (limited to 'tests')
-rw-r--r--tests/migrations/test_operations.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/migrations/test_operations.py b/tests/migrations/test_operations.py
index 9849f66882..032fc44549 100644
--- a/tests/migrations/test_operations.py
+++ b/tests/migrations/test_operations.py
@@ -1378,6 +1378,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):
"""