diff options
| author | 2023-04-22 14:01:29 +0100 | |
|---|---|---|
| committer | 2023-04-22 14:01:29 +0100 | |
| commit | 7d944f73a9d1536bda0b015c00a7768a3515c4bf (patch) | |
| tree | bb7ea133e5e4d58425075abe7a01c03eef972658 /pydis_site/apps/content/tests | |
| parent | Seperate manual configuration out of the main bot contributing guide (diff) | |
| parent | Make unittests independent of GitHub (#948) (diff) | |
Merge branch 'main' into Simplify-the-bot-contributing-guide
Diffstat (limited to 'pydis_site/apps/content/tests')
| -rw-r--r-- | pydis_site/apps/content/tests/test_views.py | 5 | 
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): | 
