summaryrefslogtreecommitdiff
path: root/ishtar_common
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
commit656ac8677952018fb58dc87c68f5509ba58208d9 (patch)
tree60fb8dbf5cd76ab46ccfdf975b216999c6d3315d /ishtar_common
parente886e8a1a79880bed9cd0ec480a0658ae93ad400 (diff)
downloadIshtar-656ac8677952018fb58dc87c68f5509ba58208d9.tar.bz2
Ishtar-656ac8677952018fb58dc87c68f5509ba58208d9.zip
Django 1.8: remove transaction.commit_unless_managed
Diffstat (limited to 'ishtar_common')
-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):