summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Charette <charette.s@gmail.com>2014-08-03 16:32:36 -0400
committerSimon Charette <charette.s@gmail.com>2014-08-03 17:02:49 -0400
commit99f3a65c730f643d35d959aa9a693101b2d21efd (patch)
treeceafbc2a736465dce366bb0900118551dcd352b1
parent6b2473d3e8048158dbc8c886d755cbf948325077 (diff)
[1.7.x] Fixed a MySQL test failure introduced by cbb29af1aa.
Seems like unlike other backends MySQL get_constraints fails when dealing with a non-existing table. refs #23160. Backport of 1b00738f73 from master
-rw-r--r--tests/migrations/test_operations.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/migrations/test_operations.py b/tests/migrations/test_operations.py
index ea9e0457f5..cbcc2babbe 100644
--- a/tests/migrations/test_operations.py
+++ b/tests/migrations/test_operations.py
@@ -426,13 +426,13 @@ class OperationTests(OperationTestBase):
self.assertTableNotExists("test_rmwsrf_horserider")
if connection.features.supports_foreign_keys:
self.assertFKExists("test_rmwsrf_rider", ["friend_id"], ("test_rmwsrf_rider", "id"))
- self.assertFKNotExists("test_rmwsrf_horserider", ["friend_id"], ("test_rmwsrf_horserider", "id"))
+ self.assertFKNotExists("test_rmwsrf_rider", ["friend_id"], ("test_rmwsrf_horserider", "id"))
with connection.schema_editor() as editor:
operation.database_forwards("test_rmwsrf", editor, project_state, new_state)
self.assertTableNotExists("test_rmwsrf_rider")
self.assertTableExists("test_rmwsrf_horserider")
if connection.features.supports_foreign_keys:
- self.assertFKNotExists("test_rmwsrf_rider", ["friend_id"], ("test_rmwsrf_rider", "id"))
+ self.assertFKNotExists("test_rmwsrf_horserider", ["friend_id"], ("test_rmwsrf_rider", "id"))
self.assertFKExists("test_rmwsrf_horserider", ["friend_id"], ("test_rmwsrf_horserider", "id"))
# And test reversal
with connection.schema_editor() as editor:
@@ -441,7 +441,7 @@ class OperationTests(OperationTestBase):
self.assertTableNotExists("test_rmwsrf_horserider")
if connection.features.supports_foreign_keys:
self.assertFKExists("test_rmwsrf_rider", ["friend_id"], ("test_rmwsrf_rider", "id"))
- self.assertFKNotExists("test_rmwsrf_horserider", ["friend_id"], ("test_rmwsrf_horserider", "id"))
+ self.assertFKNotExists("test_rmwsrf_rider", ["friend_id"], ("test_rmwsrf_horserider", "id"))
def test_add_field(self):
"""