summaryrefslogtreecommitdiff
path: root/tests/auth_tests/test_context_processors.py
diff options
context:
space:
mode:
authorJosh Smeaton <josh.smeaton@gmail.com>2015-02-23 11:53:57 +1100
committerJosh Smeaton <josh.smeaton@gmail.com>2015-03-05 10:10:32 +1100
commit39a7eed1bbf12020a077e4bec3d82e08f171a021 (patch)
tree225be14a94d57517d9de646569498eb45d0a4352 /tests/auth_tests/test_context_processors.py
parentd6969abf239d52f6dfed7384c6ceb7df7e618342 (diff)
Converted test fixtures to setUpTestData methods
Diffstat (limited to 'tests/auth_tests/test_context_processors.py')
-rw-r--r--tests/auth_tests/test_context_processors.py13
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):