mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Switched setUp() to setUpTestData() where possible in Django's tests.
This commit is contained in:
committed by
Tim Graham
parent
9a7d336c38
commit
84e7a9f4a7
@@ -10,7 +10,8 @@ from .models import CustomArticle, ExclusiveArticle, SyndicatedArticle
|
||||
|
||||
|
||||
class SitesFrameworkTestCase(TestCase):
|
||||
def setUp(self):
|
||||
@classmethod
|
||||
def setUpTestData(cls):
|
||||
Site.objects.get_or_create(id=settings.SITE_ID, domain="example.com", name="example.com")
|
||||
Site.objects.create(id=settings.SITE_ID + 1, domain="example2.com", name="example2.com")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user