1
0
mirror of https://github.com/django/django.git synced 2025-10-26 15:16:09 +00:00

[1.7.x] Fixed #23121: AlterModelOptions operation not changing state right

This commit is contained in:
Andrew Godwin
2014-07-28 10:47:28 -07:00
parent d84b881600
commit 394053ce60
4 changed files with 45 additions and 18 deletions

View File

@@ -885,6 +885,13 @@ class AutodetectorTests(TestCase):
self.assertNumberMigrations(changes, "testapp", 1)
# Right actions in right order?
self.assertOperationTypes(changes, "testapp", 0, ["AlterModelOptions"])
# Changing them back to empty should also make a change
before = self.make_project_state([self.author_with_options])
after = self.make_project_state([self.author_empty])
autodetector = MigrationAutodetector(before, after)
changes = autodetector._detect_changes()
self.assertNumberMigrations(changes, "testapp", 1)
self.assertOperationTypes(changes, "testapp", 0, ["AlterModelOptions"])
def test_alter_model_options_proxy(self):
"""