From 9667a4868760741fab894ef88e403f7ecb512e61 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Sat, 22 Jun 2024 16:38:00 +0100 Subject: Better use of pytest-django mark --- pyblackbird_cc/resources/tests/test_views.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'pyblackbird_cc/resources') diff --git a/pyblackbird_cc/resources/tests/test_views.py b/pyblackbird_cc/resources/tests/test_views.py index 123476f..0cf242f 100644 --- a/pyblackbird_cc/resources/tests/test_views.py +++ b/pyblackbird_cc/resources/tests/test_views.py @@ -9,20 +9,19 @@ from django.test import TestCase from django.urls import reverse from .. import services +from ..forms import ResourceCreateForm from ..models import ResourceCategory from ..models import ResourceType -from ..forms import ResourceCreateForm from ..views import create_resource +pytestmark = pytest.mark.django_db -@pytest.mark.django_db() def test_create_featured_resource_view(client): url = reverse("resources:create_featured") response = client.get(url) assert response.status_code == 302 -@pytest.mark.django_db() def test_create_resource_view(client): url = reverse("resources:create_resource") response = client.get(url) -- cgit v1.2.3