populate command call once for all tests

This commit is contained in:
maréchal
2023-04-28 11:36:02 +02:00
parent 66fcb76cb5
commit af4c9cbdd4
14 changed files with 77 additions and 117 deletions

View File

@ -102,9 +102,9 @@ class SubscriptionUnitTest(TestCase):
class SubscriptionIntegrationTest(TestCase):
def setUp(self):
call_command("populate")
self.user = User.objects.filter(username="public").first()
@classmethod
def setUp(cls):
cls.user = User.objects.filter(username="public").first()
def test_duration_one_month(self):
s = Subscription(