diff options
author | 2021-05-19 09:02:21 +0200 | |
---|---|---|
committer | 2021-05-19 09:02:21 +0200 | |
commit | 5c37aee79c04d9199dc47b9d60f9899a0f6571d9 (patch) | |
tree | 9041c01dc0124fe96be467de7bb994daa372efd3 /pydis_site/apps/resources/tests | |
parent | Add bulma-modal, we'll need it later. (diff) |
Dramatically simplify resources.
We don't need _category_info, we don't need subcategories, we this will
be much simpler now.
Also, rglob is nice.
Diffstat (limited to 'pydis_site/apps/resources/tests')
3 files changed, 5 insertions, 10 deletions
diff --git a/pydis_site/apps/resources/tests/test_views.py b/pydis_site/apps/resources/tests/test_views.py index 53685eef..568f4d13 100644 --- a/pydis_site/apps/resources/tests/test_views.py +++ b/pydis_site/apps/resources/tests/test_views.py @@ -19,16 +19,13 @@ class TestResourcesView(TestCase): 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") 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",)) - response = self.client.get(url) - self.assertEqual(response.status_code, 404) + @patch("pydis_site.apps.resources.utils.RESOURCES_PATH", TESTING_RESOURCES_PATH) + def test_filter_resource_list(self): + """TODO: Check that we can correctly filter resources with GET parameters.""" + pass diff --git a/pydis_site/apps/resources/tests/testing_resources/testing/_category_info.yaml b/pydis_site/apps/resources/tests/testing_resources/testing/_category_info.yaml deleted file mode 100644 index bae17ea3..00000000 --- a/pydis_site/apps/resources/tests/testing_resources/testing/_category_info.yaml +++ /dev/null @@ -1 +0,0 @@ -name: Testing diff --git a/pydis_site/apps/resources/tests/testing_resources/testing/foobar/_category_info.yaml b/pydis_site/apps/resources/tests/testing_resources/testing/foobar/_category_info.yaml deleted file mode 100644 index eaac32d9..00000000 --- a/pydis_site/apps/resources/tests/testing_resources/testing/foobar/_category_info.yaml +++ /dev/null @@ -1 +0,0 @@ -name: Foobar |