Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added support for database cache table in test database.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@5766 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 386a4c610c3db14b713d1840baae54372cf0c63e 1 parent 812583c
Malcolm Tredinnick authored July 26, 2007

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

  1. 4  django/test/utils.py
4  django/test/utils.py
@@ -144,6 +144,10 @@ def create_test_db(verbosity=1, autoclobber=False):
144 144
 
145 145
     management.syncdb(verbosity, interactive=False)
146 146
 
  147
+    if settings.CACHE_BACKEND.startswith('db://'):
  148
+        cache_name = settings.CACHE_BACKEND[len('db://'):]
  149
+        management.createcachetable(cache_name)
  150
+
147 151
     # Get a cursor (even though we don't need one yet). This has
148 152
     # the side effect of initializing the test database.
149 153
     cursor = connection.cursor()

0 notes on commit 386a4c6

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