aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps/resources/tests
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2021-10-06 22:38:16 +0100
committerGravatar GitHub <[email protected]>2021-10-06 22:38:16 +0100
commit3c2fcb86b7aad1ddca92e54c2fd39693e55109f8 (patch)
tree2eab9855ab1a83352a5d83050d8a1fc0524f3285 /pydis_site/apps/resources/tests
parentMerge pull request #599 from python-discord/fix-http-links (diff)
parentMerge branch 'master' into subdomains-to-query-paths (diff)
Merge pull request #526 from python-discord/subdomains-to-query-paths
Diffstat (limited to 'pydis_site/apps/resources/tests')
-rw-r--r--pydis_site/apps/resources/tests/test_views.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pydis_site/apps/resources/tests/test_views.py b/pydis_site/apps/resources/tests/test_views.py
index 53685eef..3ad0b958 100644
--- a/pydis_site/apps/resources/tests/test_views.py
+++ b/pydis_site/apps/resources/tests/test_views.py
@@ -3,7 +3,7 @@ from unittest.mock import patch
from django.conf import settings
from django.test import TestCase
-from django_hosts import reverse
+from django.urls import reverse
TESTING_RESOURCES_PATH = Path(
settings.BASE_DIR, "pydis_site", "apps", "resources", "tests", "testing_resources"
@@ -22,13 +22,13 @@ class TestResourcesListView(TestCase):
@patch("pydis_site.apps.resources.views.resources_list.RESOURCES_PATH", TESTING_RESOURCES_PATH)
def test_valid_resource_list_200(self):
"""Check does site return code 200 when visiting valid resource list."""
- url = reverse("resources:resources", ("testing",))
+ url = reverse("resources:resources", args=("testing",))
response = self.client.get(url)
self.assertEqual(response.status_code, 200)
@patch("pydis_site.apps.resources.views.resources_list.RESOURCES_PATH", TESTING_RESOURCES_PATH)
def test_invalid_resource_list_404(self):
"""Check does site return code 404 when trying to visit invalid resource list."""
- url = reverse("resources:resources", ("invalid",))
+ url = reverse("resources:resources", args=("invalid",))
response = self.client.get(url)
self.assertEqual(response.status_code, 404)