Commits

Jason Moiron committed 0e57016

sqlite3's connection object isn't threadsafe so we can't really test some transaction features with it; use mysql or postgres to run these unit tests

Comments (0)

Files changed (2)

johnny/tests/cache.py

         if len(getattr(settings, "DATABASES", [])) <= 1:
             print "\n  Skipping multi databases"
             return
+        if settings.DATABASE_ENGINE == 'sqlite3':
+            print "\n  Skipping test requiring multiple threads."
+            return
         from Queue import Queue as queue
+
         q = queue()
         other = lambda x: self._run_threaded(x, q)
 
         if len(getattr(settings, "DATABASES", [])) <= 1:
             print "\n  Skipping multi databases"
             return
+        if settings.DATABASE_ENGINE == 'sqlite3':
+            print "\n  Skipping test requiring multiple threads."
+            return
 
         from Queue import Queue as queue
         q = queue()
         from django.db import transaction
         from testapp.models import Genre, Publisher
         from johnny import cache
+        if settings.DATABASE_ENGINE == 'sqlite3':
+            print "\n  Skipping test requiring multiple threads."
+            return
 
         self.failUnless(transaction.is_managed() == False)
         self.failUnless(transaction.is_dirty() == False)
         from django.db import transaction
         from testapp.models import Genre, Publisher
         from johnny import cache
+        if settings.DATABASE_ENGINE == 'sqlite3':
+            print "\n  Skipping test requiring multiple threads."
+            return
 
         self.failUnless(transaction.is_managed() == False)
         self.failUnless(transaction.is_dirty() == False)
 
 MANAGERS = ADMINS
 DATABASE_ENGINE = 'sqlite3'     # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
-DATABASE_NAME = 'johnny/db.sql' # Or path to database file if using sqlite3.
+DATABASE_NAME = 'johnny-db.sql' # Or path to database file if using sqlite3.
 DATABASE_USER = ''              # Not used with sqlite3.
 DATABASE_PASSWORD = ''          # Not used with sqlite3.
 DATABASE_HOST = ''              # Set to empty string for localhost. Not used with sqlite3.