diff --git a/biscuit/core/tests/models/test_person.py b/biscuit/core/tests/models/test_person.py index 740031df0c419221d0299c7b3079ac4c2d490d1c..afe29db35a8b62c65ca251aa348b8c52e14e64f9 100644 --- a/biscuit/core/tests/models/test_person.py +++ b/biscuit/core/tests/models/test_person.py @@ -3,7 +3,9 @@ import pytest from biscuit.core.models import Person -@pytest.mark.django_db +pytestmark = pytest.mark.django_db + + def test_full_name(): _person = Person.objects.create(first_name="Jane", last_name="Doe") diff --git a/biscuit/core/tests/views/test_account.py b/biscuit/core/tests/views/test_account.py index 2e4e7fb3cf748e3857baea4b3ea1ca2cffd03db8..5fd9dbf8e33a2cd61d17a14e4d752326677b4e71 100644 --- a/biscuit/core/tests/views/test_account.py +++ b/biscuit/core/tests/views/test_account.py @@ -4,7 +4,9 @@ from django.urls import reverse import pytest -@pytest.mark.django_db +pytestmark = pytest.mark.django_db + + def test_index_not_logged_in(client): response = client.get("/") @@ -12,7 +14,6 @@ def test_index_not_logged_in(client): assert reverse(settings.LOGIN_URL) in response.content.decode("utf-8") -@pytest.mark.django_db def test_login(client, django_user_model): username = "foo" password = "bar" @@ -26,7 +27,6 @@ def test_login(client, django_user_model): assert reverse(settings.LOGIN_URL) not in response.content.decode("utf-8") -@pytest.mark.django_db def test_index_not_linked_to_person(client, django_user_model): username = "foo" password = "bar" @@ -40,7 +40,6 @@ def test_index_not_linked_to_person(client, django_user_model): assert "You are not linked to a person" in response.content.decode("utf-8") -@pytest.mark.django_db def test_logout(client, django_user_model): username = "foo" password = "bar"