mirror of
				https://github.com/django/django.git
				synced 2025-10-31 01:25:32 +00:00 
			
		
		
		
	Added a test for [6889]
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6890 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
		| @@ -1,5 +1,6 @@ | |||||||
| r""" | r""" | ||||||
|  |  | ||||||
|  | >>> from django.conf import settings | ||||||
| >>> from django.contrib.sessions.backends.db import SessionStore as DatabaseSession | >>> 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.cache import SessionStore as CacheSession | ||||||
| >>> from django.contrib.sessions.backends.file import SessionStore as FileSession | >>> from django.contrib.sessions.backends.file import SessionStore as FileSession | ||||||
| @@ -39,6 +40,13 @@ True | |||||||
| >>> file_session.exists(file_session.session_key) | >>> file_session.exists(file_session.session_key) | ||||||
| False | 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 = CacheSession() | ||||||
| >>> cache_session.modified | >>> cache_session.modified | ||||||
| False | False | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user