From 4c51dd8f9f4058aaea60a57ed90ec0cb7390a249 Mon Sep 17 00:00:00 2001
From: Dominik George <dominik.george@teckids.org>
Date: Fri, 13 Dec 2019 14:03:17 +0100
Subject: [PATCH] [Tests] Use file global marks everywhere

---
 biscuit/core/tests/models/test_person.py | 4 +++-
 biscuit/core/tests/views/test_account.py | 7 +++----
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/biscuit/core/tests/models/test_person.py b/biscuit/core/tests/models/test_person.py
index 740031df0..afe29db35 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 2e4e7fb3c..5fd9dbf8e 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"
-- 
GitLab