fix: load entities for tests

This commit is contained in:
Reto Aebersold 2023-11-16 10:38:41 +01:00 committed by Christian Cueni
parent cd6585790e
commit 30d2919be2
1 changed files with 4 additions and 0 deletions

View File

@ -2,7 +2,9 @@ from django.urls import reverse
from rest_framework import status
from rest_framework.test import APITestCase
from vbv_lernwelt.core.model_utils import add_organisations
from vbv_lernwelt.core.models import User
from vbv_lernwelt.shop.model_utils import add_countries
class MeUserViewTest(APITestCase):
@ -11,6 +13,8 @@ class MeUserViewTest(APITestCase):
"testuser", "test@example.com", "testpassword"
)
self.client.login(username="testuser", password="testpassword")
add_organisations()
add_countries()
def test_user_can_update_language(self) -> None:
# GIVEN