aboutsummaryrefslogtreecommitdiffstats
path: root/pyblackbird_cc/resources/tests/test_views.py
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2024-05-26 15:56:17 +0100
committerMatthew Lemon <y@yulqen.org>2024-05-26 15:56:17 +0100
commitd209dcbbcc36e65b8e16aca94add3f39de6414ef (patch)
tree96c38b555688d97024fb771a172ce36112c106d9 /pyblackbird_cc/resources/tests/test_views.py
parenteeaa3c469b33e614941596a04d56af3be1290456 (diff)
Basic feature slot presentation in index page
Diffstat (limited to 'pyblackbird_cc/resources/tests/test_views.py')
-rw-r--r--pyblackbird_cc/resources/tests/test_views.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/pyblackbird_cc/resources/tests/test_views.py b/pyblackbird_cc/resources/tests/test_views.py
index 27a6a85..123476f 100644
--- a/pyblackbird_cc/resources/tests/test_views.py
+++ b/pyblackbird_cc/resources/tests/test_views.py
@@ -11,6 +11,7 @@ from django.urls import reverse
from .. import services
from ..models import ResourceCategory
from ..models import ResourceType
+from ..forms import ResourceCreateForm
from ..views import create_resource
@@ -21,6 +22,19 @@ def test_create_featured_resource_view(client):
assert response.status_code == 302
+@pytest.mark.django_db()
+def test_create_resource_view(client):
+ url = reverse("resources:create_resource")
+ response = client.get(url)
+ assert response.status_code == 302
+
+
+def test_create_resource_has_form(client):
+ url = reverse("resources:create_resource")
+ response = client.get(url)
+ assert type(response.context["form"]) == ResourceCreateForm
+
+
class PDFFileUploadTestCase(TestCase):
def setUp(self):
self.url = reverse("resources:create_resource")