0
0
mirror of https://github.com/django/django.git synced 2024-12-01 15:42:04 +01:00

Fixed #25558 -- Fixed nondeterministic test failure on Windows: test_clearsessions_command.

The test session without an expiration date added in refs #22938 wasn't
always deleted on Windows because get_expiry_age() returns zero and the
file backend didn't consider that an expired session.
This commit is contained in:
Brian Gianforcaro 2015-10-15 15:40:08 -07:00 committed by Tim Graham
parent c1b6a8a98b
commit a3fffdca24

View File

@ -99,7 +99,7 @@ class SessionStore(SessionBase):
# Remove expired sessions.
expiry_age = self.get_expiry_age(expiry=self._expiry_date(session_data))
if expiry_age < 0:
if expiry_age <= 0:
session_data = {}
self.delete()
self.create()