summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2014-09-17 19:45:42 -0400
committerTim Graham <timograham@gmail.com>2014-09-19 12:10:37 -0400
commitc61d2c0387aeeaf5600b85c08b0d01b10655155c (patch)
tree3d534305cf6d224a3772c4ed09d588ec830c869b
parent07b4c3e115ba6cbd29d1b037f9a6bb774ca449a3 (diff)
[1.7.x] Improved GIS migration test cleanup; refs #23504.
Backport of 8facb02faf from master
-rw-r--r--django/contrib/gis/tests/gis_migrations/test_operations.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/contrib/gis/tests/gis_migrations/test_operations.py b/django/contrib/gis/tests/gis_migrations/test_operations.py
index c6ef682e3c..d10542e788 100644
--- a/django/contrib/gis/tests/gis_migrations/test_operations.py
+++ b/django/contrib/gis/tests/gis_migrations/test_operations.py
@@ -67,6 +67,7 @@ class OperationTests(TransactionTestCase):
operation.state_forwards("gis", new_state)
with connection.schema_editor() as editor:
operation.database_forwards("gis", editor, project_state, new_state)
+ self.current_state = new_state
self.assertColumnExists("gis_neighborhood", "path")
# Test GeometryColumns when available
@@ -75,7 +76,6 @@ class OperationTests(TransactionTestCase):
GeometryColumns.objects.filter(**{GeometryColumns.table_name_col(): "gis_neighborhood"}).count(),
2
)
- self.current_state = new_state
def test_remove_gis_field(self):
"""
@@ -87,6 +87,7 @@ class OperationTests(TransactionTestCase):
operation.state_forwards("gis", new_state)
with connection.schema_editor() as editor:
operation.database_forwards("gis", editor, project_state, new_state)
+ self.current_state = new_state
self.assertColumnNotExists("gis_neighborhood", "geom")
# Test GeometryColumns when available
@@ -95,4 +96,3 @@ class OperationTests(TransactionTestCase):
GeometryColumns.objects.filter(**{GeometryColumns.table_name_col(): "gis_neighborhood"}).count(),
0
)
- self.current_state = new_state