mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-25 12:12:27 +02:00
solo handles this testing
This commit is contained in:
parent
12efafc90d
commit
28cf896e61
@ -1,5 +1,5 @@
|
||||
from django.db.utils import IntegrityError
|
||||
from allianceauth.analytics.models import AnalyticsIdentifier
|
||||
from django.core.exceptions import ValidationError
|
||||
|
||||
from django.test.testcases import TestCase
|
||||
|
||||
@ -15,13 +15,3 @@ class TestAnalyticsIdentifier(TestCase):
|
||||
|
||||
def test_identifier_random(self):
|
||||
self.assertNotEqual(AnalyticsIdentifier.get_solo(), uuid4)
|
||||
|
||||
def test_identifier_singular(self):
|
||||
AnalyticsIdentifier.get_solo().delete()
|
||||
AnalyticsIdentifier.objects.create(identifier=uuid_1)
|
||||
# Yeah i have multiple asserts here, they all do the same thing
|
||||
with self.assertRaises(ValidationError):
|
||||
AnalyticsIdentifier.objects.create(identifier=uuid_2)
|
||||
self.assertEqual(AnalyticsIdentifier.objects.count(), 1)
|
||||
self.assertEqual(AnalyticsIdentifier.objects.get(
|
||||
pk=1).identifier, UUID(uuid_1))
|
||||
|
Loading…
x
Reference in New Issue
Block a user