Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
@malcolmt malcolmt authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 django/test/utils.py
View
4 django/test/utils.py
@@ -144,6 +144,10 @@ def create_test_db(verbosity=1, autoclobber=False):
management.syncdb(verbosity, interactive=False)
+ if settings.CACHE_BACKEND.startswith('db://'):
+ cache_name = settings.CACHE_BACKEND[len('db://'):]
+ management.createcachetable(cache_name)
+
# Get a cursor (even though we don't need one yet). This has
# the side effect of initializing the test database.
cursor = connection.cursor()
Please sign in to comment.
Something went wrong with that request. Please try again.