summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Kaplan-Moss <jacob@jacobian.org>2007-12-04 20:29:43 +0000
committerJacob Kaplan-Moss <jacob@jacobian.org>2007-12-04 20:29:43 +0000
commit35921e570b22d09ef86d2c189c1901d4835752c5 (patch)
tree023ed0710da97f904c3d41abd4ab35c10661df1f
parent602b7bca7aa0b94bb38ba16735635959e04d91ab (diff)
Added a test for [6889]
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6890 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/contrib/sessions/tests.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/django/contrib/sessions/tests.py b/django/contrib/sessions/tests.py
index 10bec9668b..b2c664ce7b 100644
--- a/django/contrib/sessions/tests.py
+++ b/django/contrib/sessions/tests.py
@@ -1,5 +1,6 @@
r"""
+>>> from django.conf import settings
>>> from django.contrib.sessions.backends.db import SessionStore as DatabaseSession
>>> from django.contrib.sessions.backends.cache import SessionStore as CacheSession
>>> from django.contrib.sessions.backends.file import SessionStore as FileSession
@@ -39,6 +40,13 @@ True
>>> file_session.exists(file_session.session_key)
False
+# Make sure the file backend checks for a good storage dir
+>>> settings.SESSION_FILE_PATH = "/if/this/directory/exists/you/have/a/weird/computer"
+>>> FileSession()
+Traceback (innermost last):
+ ...
+ImproperlyConfigured: The session storage path '/if/this/directory/exists/you/have/a/weird/computer' doesn't exist. Please set your SESSION_FILE_PATH setting to an existing directory in which Django can store session data.
+
>>> cache_session = CacheSession()
>>> cache_session.modified
False