mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Converted test fixtures to setUpTestData methods
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import datetime
|
||||
|
||||
from django.apps import apps
|
||||
from django.contrib import admin
|
||||
from django.contrib.auth.models import User as AuthUser
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
from django.core import checks, exceptions, management
|
||||
from django.core.urlresolvers import reverse
|
||||
@@ -394,7 +397,17 @@ class ProxyModelTests(TestCase):
|
||||
@override_settings(PASSWORD_HASHERS=['django.contrib.auth.hashers.SHA1PasswordHasher'],
|
||||
ROOT_URLCONF='proxy_models.urls',)
|
||||
class ProxyModelAdminTests(TestCase):
|
||||
fixtures = ['myhorses']
|
||||
|
||||
@classmethod
|
||||
def setUpTestData(cls):
|
||||
cls.u1 = AuthUser.objects.create(
|
||||
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)
|
||||
)
|
||||
cls.tu1 = ProxyTrackerUser.objects.create(name='Django Pony', status='emperor')
|
||||
cls.i1 = Issue.objects.create(summary="Pony's Issue", assignee=cls.tu1)
|
||||
|
||||
def test_cascade_delete_proxy_model_admin_warning(self):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user