Fix test classes

This commit is contained in:
Raphael Michel
2023-02-01 12:27:15 +01:00
parent cb734510ac
commit 8b81ef6f43
6 changed files with 55 additions and 68 deletions

View File

@@ -39,15 +39,12 @@ class CacheTest(TestCase):
This test case tests the invalidation of the event related
cache.
"""
@classmethod
def setUpTestData(cls):
def setUp(self):
o = Organizer.objects.create(name='Dummy', slug='dummy')
cls.event = Event.objects.create(
self.event = Event.objects.create(
organizer=o, name='Dummy', slug='dummy',
date_from=now(),
)
def setUp(self):
self.cache = self.event.get_cache()
randint = random.random()
self.testkey = "test" + str(randint)