aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps/content/tests
diff options
context:
space:
mode:
authorGravatar shtlrs <[email protected]>2023-05-07 16:00:28 +0100
committerGravatar shtlrs <[email protected]>2023-05-07 16:00:28 +0100
commit804ef7543843786a82a0a42aaf5ada818dab3f26 (patch)
treed9497896da7fb1fb042741a764df77c1c694755d /pydis_site/apps/content/tests
parentupdate forgotten mentions of sir-lancebot-commands channel (diff)
parentMerge pull request #949 from python-discord/hedyhli-edit-on-github (diff)
Merge branch 'main' into update-sir-lancebot-contrib-guide
Diffstat (limited to 'pydis_site/apps/content/tests')
-rw-r--r--pydis_site/apps/content/tests/test_views.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/pydis_site/apps/content/tests/test_views.py b/pydis_site/apps/content/tests/test_views.py
index 3ef9bcc4..e4f898ef 100644
--- a/pydis_site/apps/content/tests/test_views.py
+++ b/pydis_site/apps/content/tests/test_views.py
@@ -1,6 +1,6 @@
import textwrap
from pathlib import Path
-from unittest import TestCase
+from unittest import TestCase, mock
import django.test
import markdown
@@ -223,7 +223,8 @@ class TagViewTests(django.test.TestCase):
def test_invalid_tag_404(self):
"""Test that a tag which doesn't exist raises a 404."""
- response = self.client.get("/pages/tags/non-existent/")
+ with mock.patch("pydis_site.apps.content.utils.fetch_tags", autospec=True):
+ response = self.client.get("/pages/tags/non-existent/")
self.assertEqual(404, response.status_code)
def test_context_tag(self):