aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps/api/tests
diff options
context:
space:
mode:
Diffstat (limited to 'pydis_site/apps/api/tests')
-rw-r--r--pydis_site/apps/api/tests/test_allowlists.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/pydis_site/apps/api/tests/test_allowlists.py b/pydis_site/apps/api/tests/test_allowlists.py
index 5aa50670..1440dc71 100644
--- a/pydis_site/apps/api/tests/test_allowlists.py
+++ b/pydis_site/apps/api/tests/test_allowlists.py
@@ -54,6 +54,14 @@ class FetchTests(APISubdomainTestCase):
self.assertEqual(response.status_code, 200)
self.assertEqual(response.json().get("content"), self.jpeg_format.content)
+ def test_returns_allow_deny_list_types(self):
+ response = self.client.get(f'{URL}/get_types')
+
+ self.assertEqual(response.status_code, 200)
+ for api_type, model_type in zip(response.json(), AllowDenyList.AllowDenyListType.choices):
+ self.assertEquals(api_type[0], model_type[0])
+ self.assertEquals(api_type[1], model_type[1])
+
class CreationTests(APISubdomainTestCase):
def test_returns_400_for_missing_params(self):