test: Add test for creating a standard user
This commit is contained in:
parent
993f8f9cd2
commit
03d40a5092
@ -4,7 +4,15 @@ from django.utils import timezone
|
||||
from django.test import TestCase
|
||||
from model_bakery import baker
|
||||
|
||||
from fellchensammlung.models import Announcement, Language
|
||||
from fellchensammlung.models import Announcement, Language, User
|
||||
|
||||
|
||||
class UserTest(TestCase):
|
||||
def test_creating_user(self):
|
||||
test_user_1 = User.objects.create(username="Testuser1", password="SUPERSECRET", email="test@example.org")
|
||||
|
||||
self.assertTrue(test_user_1.trust_level == 1)
|
||||
self.assertTrue(test_user_1.trust_level == User.TRUST_LEVEL[User.MEMBER])
|
||||
|
||||
|
||||
class AnnouncementTest(TestCase):
|
||||
@ -69,4 +77,3 @@ class AnnouncementTest(TestCase):
|
||||
self.assertTrue(self.announcement2 not in active_announcements)
|
||||
self.assertTrue(self.announcement4 not in active_announcements)
|
||||
self.assertTrue(self.announcement5 in active_announcements)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user