summaryrefslogtreecommitdiff
path: root/tests/postgres_tests/test_unaccent.py
diff options
context:
space:
mode:
authorSimon Charette <charette.s@gmail.com>2018-11-23 20:59:38 -0500
committerTim Graham <timograham@gmail.com>2018-11-27 09:35:17 -0500
commit84e7a9f4a7bb3cad2bffae97baaae99de152c451 (patch)
treec81eeb6edf47ce0abdb7551cd28a3de354dfd20f /tests/postgres_tests/test_unaccent.py
parent9a7d336c3866c5226ed11868be0234c7e2fa47fa (diff)
Switched setUp() to setUpTestData() where possible in Django's tests.
Diffstat (limited to 'tests/postgres_tests/test_unaccent.py')
-rw-r--r--tests/postgres_tests/test_unaccent.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/postgres_tests/test_unaccent.py b/tests/postgres_tests/test_unaccent.py
index 477bb3d653..6d52f1d7dd 100644
--- a/tests/postgres_tests/test_unaccent.py
+++ b/tests/postgres_tests/test_unaccent.py
@@ -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):