chore(test): introduce further randomness to class fixtures so as not to create duplicate errors

ref: #754
This commit is contained in:
2025-05-13 23:30:19 +09:30
parent 1946c7aa88
commit 820755b9e0
4 changed files with 20 additions and 6 deletions

View File

@ -1,3 +1,4 @@
import datetime
import pytest
import sys
@ -485,8 +486,10 @@ def organization_one(django_db_blocker):
with django_db_blocker.unblock():
random_str = datetime.datetime.now(tz=datetime.timezone.utc)
item = Organization.objects.create(
name = 'org one'
name = 'org one from global' + str(random_str)
)
yield item
@ -504,8 +507,10 @@ def organization_two(django_db_blocker):
with django_db_blocker.unblock():
random_str = datetime.datetime.now(tz=datetime.timezone.utc)
item = Organization.objects.create(
name = 'org two'
name = 'org two from global' + str(random_str)
)
yield item