Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Simplified testing connection type

  • Loading branch information...
commit b96f3043a69bec4803d0c5cd84d3107c1ea94fa5 1 parent 550b619
Claude Paroz authored July 09, 2013

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. 4  django/test/testcases.py
4  django/test/testcases.py
@@ -1128,7 +1128,7 @@ def setUpClass(cls):
1128 1128
         for conn in connections.all():
1129 1129
             # If using in-memory sqlite databases, pass the connections to
1130 1130
             # the server thread.
1131  
-            if (conn.settings_dict['ENGINE'].rsplit('.', 1)[-1] in ('sqlite3', 'spatialite')
  1131
+            if (conn.vendor == 'sqlite'
1132 1132
                 and conn.settings_dict['NAME'] == ':memory:'):
1133 1133
                 # Explicitly enable thread-shareability for this connection
1134 1134
                 conn.allow_thread_sharing = True
@@ -1180,7 +1180,7 @@ def tearDownClass(cls):
1180 1180
 
1181 1181
         # Restore sqlite connections' non-sharability
1182 1182
         for conn in connections.all():
1183  
-            if (conn.settings_dict['ENGINE'].rsplit('.', 1)[-1] in ('sqlite3', 'spatialite')
  1183
+            if (conn.vendor == 'sqlite'
1184 1184
                 and conn.settings_dict['NAME'] == ':memory:'):
1185 1185
                 conn.allow_thread_sharing = False
1186 1186
 

0 notes on commit b96f304

Please sign in to comment.
Something went wrong with that request. Please try again.