mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +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,11 +10,12 @@ class UnaccentTest(PostgreSQLTestCase):
|
||||
|
||||
Model = CharFieldModel
|
||||
|
||||
def setUp(self):
|
||||
self.Model.objects.bulk_create([
|
||||
self.Model(field="àéÖ"),
|
||||
self.Model(field="aeO"),
|
||||
self.Model(field="aeo"),
|
||||
@classmethod
|
||||
def setUpTestData(cls):
|
||||
cls.Model.objects.bulk_create([
|
||||
cls.Model(field="àéÖ"),
|
||||
cls.Model(field="aeO"),
|
||||
cls.Model(field="aeo"),
|
||||
])
|
||||
|
||||
def test_unaccent(self):
|
||||
|
||||
Reference in New Issue
Block a user