mirror of
https://github.com/django/django.git
synced 2025-08-03 10:34:04 +00:00
Converted test fixtures to setUpTestData methods
This commit is contained in:
parent
d6969abf23
commit
39a7eed1bb
69 changed files with 2077 additions and 2819 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue