aboutsummaryrefslogtreecommitdiffstats
path: root/pyblackbird_cc/resources
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2024-06-22 16:38:00 +0100
committerMatthew Lemon <y@yulqen.org>2024-06-22 16:38:00 +0100
commit9667a4868760741fab894ef88e403f7ecb512e61 (patch)
tree77f6637720e9c545de6849d40ccf050e88d17937 /pyblackbird_cc/resources
parentdffe4f530812ff4087622523a598085255abc00c (diff)
Better use of pytest-django mark
Diffstat (limited to 'pyblackbird_cc/resources')
-rw-r--r--pyblackbird_cc/resources/tests/test_views.py5
1 files changed, 2 insertions, 3 deletions
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)