mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Refs #27768 -- Reversed order of optimized and in-between operations.
Operations can only be optimized through if they don't reference any of the state the operation they are compared against defines or alters, so it's safe to reverse the order.
This commit is contained in:
committed by
Tim Graham
parent
529c3f264d
commit
d3a935f01f
@@ -1165,8 +1165,8 @@ class AutodetectorTests(TestCase):
|
||||
# Right number/type of migrations?
|
||||
self.assertNumberMigrations(changes, 'testapp', 1)
|
||||
self.assertOperationTypes(changes, 'testapp', 0, ["CreateModel", "CreateModel"])
|
||||
self.assertOperationAttributes(changes, "testapp", 0, 0, name="Author")
|
||||
self.assertOperationAttributes(changes, "testapp", 0, 1, name="Publisher")
|
||||
self.assertOperationAttributes(changes, "testapp", 0, 0, name="Publisher")
|
||||
self.assertOperationAttributes(changes, "testapp", 0, 1, name="Author")
|
||||
self.assertMigrationDependencies(changes, 'testapp', 0, [("otherapp", "auto_1")])
|
||||
# Right number/type of migrations?
|
||||
self.assertNumberMigrations(changes, 'otherapp', 2)
|
||||
|
||||
Reference in New Issue
Block a user