diff options
Diffstat (limited to 'tests/auth_tests/test_context_processors.py')
| -rw-r--r-- | tests/auth_tests/test_context_processors.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/auth_tests/test_context_processors.py b/tests/auth_tests/test_context_processors.py index 26d73f2841..5f91fd1e0a 100644 --- a/tests/auth_tests/test_context_processors.py +++ b/tests/auth_tests/test_context_processors.py @@ -1,3 +1,5 @@ +import datetime + from django.contrib.auth import authenticate from django.contrib.auth.context_processors import PermLookupDict, PermWrapper from django.contrib.auth.models import Permission, User @@ -67,7 +69,16 @@ class AuthContextProcessorTests(TestCase): """ Tests for the ``django.contrib.auth.context_processors.auth`` processor """ - fixtures = ['context-processors-users.xml'] + + @classmethod + def setUpTestData(cls): + # password = "secret" + cls.u1 = User.objects.create( + id=100, password='sha1$995a3$6011485ea3834267d719b4c801409b8b1ddd0158', + last_login=datetime.datetime(2007, 5, 30, 13, 20, 10), is_superuser=True, username='super', + first_name='Super', last_name='User', email='super@example.com', + is_staff=True, is_active=True, date_joined=datetime.datetime(2007, 5, 30, 13, 20, 10) + ) @override_settings(MIDDLEWARE_CLASSES=AUTH_MIDDLEWARE_CLASSES) def test_session_not_accessed(self): |
