diff options
| author | Simon Charette <charette.s@gmail.com> | 2016-11-04 08:58:46 -0400 |
|---|---|---|
| committer | Simon Charette <charette.s@gmail.com> | 2016-12-10 10:19:06 -0500 |
| commit | ecd625e830ef765d5e60d5db7bc6e3b7ffc76d06 (patch) | |
| tree | 2c1e433d173351b9fe7cb5080803dac0df5d9c6c /tests | |
| parent | 8e3a72f4fb4e9d3f93c7d966c13d4e7446b1949e (diff) | |
Fixed #27310 -- Stopped rendering apps in RenameModel.state_forwards.
Thanks Tim for the review.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/migrations/test_operations.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/migrations/test_operations.py b/tests/migrations/test_operations.py index 8a7ccbffc2..f929ecb3b2 100644 --- a/tests/migrations/test_operations.py +++ b/tests/migrations/test_operations.py @@ -624,9 +624,11 @@ class OperationTests(OperationTestBase): self.assertIn(("test_rmwsrf", "horserider"), new_state.models) # Remember, RenameModel also repoints all incoming FKs and M2Ms self.assertEqual( - "test_rmwsrf.HorseRider", + 'self', new_state.models["test_rmwsrf", "horserider"].fields[2][1].remote_field.model ) + HorseRider = new_state.apps.get_model('test_rmwsrf', 'horserider') + self.assertIs(HorseRider._meta.get_field('horserider').remote_field.model, HorseRider) # Test the database alteration self.assertTableExists("test_rmwsrf_rider") self.assertTableNotExists("test_rmwsrf_horserider") |
