summaryrefslogtreecommitdiff
path: root/ishtar_common/tests.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2017-04-19 10:21:37 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2017-04-19 10:21:37 +0200
commit016c49d7a9b149720c75501525f79f19a73ff3b3 (patch)
tree60fb8dbf5cd76ab46ccfdf975b216999c6d3315d /ishtar_common/tests.py
parent270d2a3735ec65b58bdb23678aaede1b0ff90b7d (diff)
downloadIshtar-016c49d7a9b149720c75501525f79f19a73ff3b3.tar.bz2
Ishtar-016c49d7a9b149720c75501525f79f19a73ff3b3.zip
Django 1.8: remove transaction.commit_unless_managed
Diffstat (limited to 'ishtar_common/tests.py')
-rw-r--r--ishtar_common/tests.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/ishtar_common/tests.py b/ishtar_common/tests.py
index 49db86b64..01ff26c5e 100644
--- a/ishtar_common/tests.py
+++ b/ishtar_common/tests.py
@@ -91,10 +91,9 @@ class TestCase(BaseTestCase):
super(TestCase, self)._pre_setup()
if settings.USE_SPATIALITE_FOR_TESTS:
return
- c = connection.cursor()
- for view in [CRBulkView, FirstBaseFindView, BFBulkView, FBulkView]:
- c.execute(view.CREATE_SQL)
- transaction.commit_unless_managed()
+ with connection.cursor() as c:
+ for view in [CRBulkView, FirstBaseFindView, BFBulkView, FBulkView]:
+ c.execute(view.CREATE_SQL)
class CommandsTestCase(TestCase):