Permalink
Browse files

Converted sessions tests from doctest to unittest.

Also made the FileSession backend consistent with other backends in one
corner case uncovered by the conversion, namely that the backend should
create a new key if the one passed in is invalid.



git-svn-id: http://code.djangoproject.com/svn/django/trunk@13482 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent c5e83a9 commit 5eece23296c481fc2f8b896b7d41e71bebe6114e @spookylukey spookylukey committed Aug 5, 2010
Showing with 274 additions and 389 deletions.
  1. +1 −1 django/contrib/sessions/backends/file.py
  2. +273 −388 django/contrib/sessions/tests.py
@@ -58,7 +58,7 @@ def load(self):
finally:
session_file.close()
except IOError:
- pass
+ self.create()
return session_data
def create(self):
Oops, something went wrong. Retry.

0 comments on commit 5eece23

Please sign in to comment.