From b8a8066ac47b50316a14b88f1e3fb236bc03576f Mon Sep 17 00:00:00 2001 From: Carl Meyer Date: Mon, 31 Jan 2011 18:37:28 +0000 Subject: [PATCH] Fixed duplicate-named contrib.sessions tests, and removed unused import (cleanup from doctest conversion). git-svn-id: http://code.djangoproject.com/svn/django/trunk@15377 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/contrib/sessions/tests.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/django/contrib/sessions/tests.py b/django/contrib/sessions/tests.py index 9b669211db..941c7e811b 100644 --- a/django/contrib/sessions/tests.py +++ b/django/contrib/sessions/tests.py @@ -9,7 +9,6 @@ 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.cached_db import SessionStore as CacheDBSession from django.contrib.sessions.backends.file import SessionStore as FileSession -from django.contrib.sessions.backends.base import SessionBase from django.contrib.sessions.models import Session from django.contrib.sessions.middleware import SessionMiddleware from django.core.exceptions import ImproperlyConfigured @@ -100,7 +99,7 @@ class SessionTestsMixin(object): self.assertFalse(self.session.modified) self.assertEqual(list(i), ['x']) - def test_iterkeys(self): + def test_itervalues(self): self.session['x'] = 1 self.session.modified = False self.session.accessed = False @@ -199,8 +198,8 @@ class SessionTestsMixin(object): age = self.session.get_expiry_age() self.assertTrue(age in (9, 10)) - def test_custom_expiry_timedelta(self): - # Using timedelta + def test_custom_expiry_datetime(self): + # Using fixed datetime self.session.set_expiry(datetime.now() + timedelta(seconds=10)) delta = self.session.get_expiry_date() - datetime.now() self.assertTrue(delta.seconds in (9, 10))