summaryrefslogtreecommitdiff
path: root/django/contrib/sessions/tests.py
AgeCommit message (Collapse)Author
2015-02-11Moved contrib.sessions tests out of contrib.Tim Graham
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2015-01-29Fixed #24223 -- Prevented a session test from leaking.Matt
2015-01-19Fixed #24153 -- Fixed cookie test compatibility with Python 3.4.3+Tim Graham
2014-12-30Applied ignore_warnings to Django testsClaude Paroz
2014-12-03Removed redundant numbered parameters from str.format().Berker Peksag
Since Python 2.7 and 3.1, "{0} {1}" is equivalent to "{} {}".
2014-11-03Fixed #23620 -- Used more specific assertions in the Django test suite.Berker Peksag
2014-09-05Limited lines to 119 characters in django/Tim Graham
refs #23395.
2014-07-24Fixed #22849 -- Added Session.__str__()Nick Sandford
2014-05-11Fixed #20936 -- When logging out/ending a session, don't create a new, empty ↵Matt Robenolt
session. Previously, when logging out, the existing session was overwritten by a new sessionid instead of deleting the session altogether. This behavior added overhead by creating a new session record in whichever backend was in use: db, cache, etc. This extra session is unnecessary at the time since no session data is meant to be preserved when explicitly logging out.
2014-04-26Fix many many typos in comments throughout the codebaseAlex Gaynor
2013-12-23Imported override_settings from its new location.Aymeric Augustin
2013-12-14Fixed E127 pep8 warnings.Loic Bistuer
2013-11-28Fixed E125 pep8 warningsChristopher Medrela
2013-11-23Fixed #21012 -- New API to access cache backends.Curtis Maloney
Thanks Curtis Malony and Florian Apolloner. Squashed commit of the following: commit 3380495e93f5e81b80a251b03ddb0a80b17685f5 Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sat Nov 23 14:18:07 2013 +0100 Looked up the template_fragments cache at runtime. commit 905a74f52b24a198f802520ff06290a94dedc687 Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sat Nov 23 14:19:48 2013 +0100 Removed all uses of create_cache. Refactored the cache tests significantly. Made it safe to override the CACHES setting. commit 35e289fe9285feffed3c60657af9279a6a2cfccc Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sat Nov 23 12:23:57 2013 +0100 Removed create_cache function. commit 8e274f747a1f1c0c0e6c37873e29067f7fa022e8 Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sat Nov 23 12:04:52 2013 +0100 Updated docs to describe a simplified cache backend API. commit ee7eb0f73e6d4699edcf5d357dce715224525cf6 Author: Curtis Maloney <curtis@tinbrain.net> Date: Sat Oct 19 09:49:24 2013 +1100 Fixed #21012 -- Thread-local caches, like databases.
2013-11-02Fixed all E261 warningscoagulant
2013-10-18Fixed #21268 -- Fixed E303 pep8 warningsAlasdair Nicol
2013-09-06Fixed a number of flake8 errors -- particularly around unused imports and ↵Alex Gaynor
local variables
2013-09-05Fixed #21000 -- Made cached_db session backend respect SESSION_CACHE_ALIASCHI Cheng
2013-08-22Fixed #20922 -- Allowed customizing the serializer used by contrib.sessionsTim Graham
Added settings.SESSION_SERIALIZER which is the import path of a serializer to use for sessions. Thanks apollo13, carljm, shaib, akaariai, charettes, and dstufft for reviews.
2013-07-01Stopped using django.utils.unittest in the test suite.Aymeric Augustin
Refs #20680.
2013-05-25Fixed #19866 -- Added security logger and return 400 for SuspiciousOperation.Preston Holmes
SuspiciousOperations have been differentiated into subclasses, and are now logged to a 'django.security.*' logger. SuspiciousOperations that reach django.core.handlers.base.BaseHandler will now return a 400 instead of a 500. Thanks to tiwoc for the report, and Carl Meyer and Donald Stufft for review.
2013-05-19Fix #19664 -- Illegal Characters In Session Key Give Fatal Error On File ↵Erik Romijn
Backend Only
2013-02-23Fixed regression introduced in 146ed13a.Mathijs de Bruin
As override_settings was used after the initialization of the session backend, we need to use a new session backend here.
2012-10-31Fixed #17083 -- Allowed sessions to use non-default cache.Aymeric Augustin
2012-10-28Marked cookies-based session expiry test as an expected failure.Aymeric Augustin
Refs #19201.
2012-10-28Fixed #18194 -- Expiration of file-based sessionsAymeric Augustin
* Prevented stale session files from being loaded * Added removal of stale session files in django-admin.py clearsessions Thanks ej for the report, crodjer and Elvard for their inputs.
2012-10-27Improved tests introduced in 04b00b6.Aymeric Augustin
These tests are expected to fail for the file session backend because it doesn't handle expiry properly. They didn't because of an error in the test setup sequence. Refs #19200, #18194.
2012-10-27Added optional kwargs to get_expiry_age/date.Aymeric Augustin
This change allows for cleaner tests: we can test the exact output. Refs #18194: this change makes it possible to compute session expiry dates at times other than when the session is saved. Fixed #18458: the existence of the `modification` kwarg implies that you must pass it to get_expiry_age/date if you call these functions outside of a short request - response cycle (the intended use case).
2012-10-27Fixed #19200 -- Session expiry with cached_dbAymeric Augustin
Also did a little bit of cleanup.
2012-09-21Fixed #10853 -- Skipped some sessions tests with dummy cache backendClaude Paroz
2012-09-08Adjust d7853c5 to not show ignorable warnings when running tests.Malcolm Tredinnick
2012-09-08Remove a couple unused imports.Carl Meyer
2012-09-08Removed warning check in test_load_overlong_keyClaude Paroz
Some backends issue a warning here, others not. This is not the primary goal of the test, so the assertion about the warning has been removed. Thanks Carl Meyer for noticing the issue and suggesting the fix.
2012-08-07[py3] Fixed access to dict keys/values/items.Aymeric Augustin
2012-07-16Fixed #3881 -- skip saving session when response status is 500Anssi Kääriäinen
Saving session data is somewhat likely to lead into error when the status code is 500. It is guaranteed to lead into error if the reason for the 500 code is query error on PostgreSQL.
2012-05-03Inserted more simplefilter calls to be sure warnings are emitted.Claude Paroz
Thanks to Florian Apolloner for suggesting the patch.
2012-05-03Made warning assertions work with or without -Wall python switchClaude Paroz
2012-05-03Used catch_warnings instead of save/restore methods. Refs #17049.Claude Paroz
2012-03-31Fixed #17965 -- Definitely dropped support for Python 2.5. Thanks jonash for ↵Claude Paroz
the initial patch and Aymeric Augustin for the review. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17834 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-30Use the class decorator syntax available in Python >= 2.6. Refs #17965.Aymeric Augustin
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17829 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-30Removed with_statement imports, useless in Python >= 2.6. Refs #17965. ↵Claude Paroz
Thanks jonash for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17828 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-23Fixed #17810. Catch session key errors.Paul McMillan
Catches memcached session key errors related to overly long session keys. This is a long-standing bug, but severity was exacerbated by the addition of cookie-backed session storage, which generates long session values. If an installation switched from cookie-backed session store to memcached, users would not be able to log in because of the server error from overly long memcached keys. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17795 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-17Fixed various dodgy behavioursAdrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17226 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-27Optimized the cached_db session backend to check if a key exists in the ↵Aymeric Augustin
cache first. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17156 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-27Fixed #11555 -- Made SessionBase.session_key read-only. Cleaned up code ↵Aymeric Augustin
slightly. Refs #13478. This also removes the implicit initialization of the session key on the first access in favor of explicit initialization. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17155 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-22Improved the test for #16847.Paul McMillan
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17141 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-21Fixed Python 2.5 test failure introduced in r17135.Paul McMillan
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17137 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-21Fixed #16847. Session Cookies now default to httponly = True.Paul McMillan
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17135 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-20Upgraded django.contrib.sessions to be compatible with time zone support.Aymeric Augustin
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17121 bcc190cf-cafb-0310-a4f2-bffc1f526a37