aboutsummaryrefslogtreecommitdiffstats
path: root/pyblackbird_cc/resources/tests/test_views.py
diff options
context:
space:
mode:
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")