Skip to content
Snippets Groups Projects
Verified Commit 4c51dd8f authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

[Tests] Use file global marks everywhere

parent 25846f1f
No related branches found
No related tags found
No related merge requests found
...@@ -3,7 +3,9 @@ import pytest ...@@ -3,7 +3,9 @@ import pytest
from biscuit.core.models import Person from biscuit.core.models import Person
@pytest.mark.django_db pytestmark = pytest.mark.django_db
def test_full_name(): def test_full_name():
_person = Person.objects.create(first_name="Jane", last_name="Doe") _person = Person.objects.create(first_name="Jane", last_name="Doe")
......
...@@ -4,7 +4,9 @@ from django.urls import reverse ...@@ -4,7 +4,9 @@ from django.urls import reverse
import pytest import pytest
@pytest.mark.django_db pytestmark = pytest.mark.django_db
def test_index_not_logged_in(client): def test_index_not_logged_in(client):
response = client.get("/") response = client.get("/")
...@@ -12,7 +14,6 @@ def test_index_not_logged_in(client): ...@@ -12,7 +14,6 @@ def test_index_not_logged_in(client):
assert reverse(settings.LOGIN_URL) in response.content.decode("utf-8") assert reverse(settings.LOGIN_URL) in response.content.decode("utf-8")
@pytest.mark.django_db
def test_login(client, django_user_model): def test_login(client, django_user_model):
username = "foo" username = "foo"
password = "bar" password = "bar"
...@@ -26,7 +27,6 @@ def test_login(client, django_user_model): ...@@ -26,7 +27,6 @@ def test_login(client, django_user_model):
assert reverse(settings.LOGIN_URL) not in response.content.decode("utf-8") 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): def test_index_not_linked_to_person(client, django_user_model):
username = "foo" username = "foo"
password = "bar" password = "bar"
...@@ -40,7 +40,6 @@ def test_index_not_linked_to_person(client, django_user_model): ...@@ -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") 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): def test_logout(client, django_user_model):
username = "foo" username = "foo"
password = "bar" password = "bar"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment