aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps/api/tests
diff options
context:
space:
mode:
authorGravatar Leon Sandøy <[email protected]>2020-07-16 20:48:56 +0200
committerGravatar Leon Sandøy <[email protected]>2020-07-16 20:48:56 +0200
commit76cd687715e49cee97bac24f5d3c8ca40ffca099 (patch)
tree604996943856e6253d2514194a29bb4d620967fd /pydis_site/apps/api/tests
parentFix some broken tests. (diff)
Rename AllowList to AllowDenyList.
https://github.com/python-discord/site/issues/305
Diffstat (limited to 'pydis_site/apps/api/tests')
-rw-r--r--pydis_site/apps/api/tests/test_allowlists.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/pydis_site/apps/api/tests/test_allowlists.py b/pydis_site/apps/api/tests/test_allowlists.py
index c6004439..5aa50670 100644
--- a/pydis_site/apps/api/tests/test_allowlists.py
+++ b/pydis_site/apps/api/tests/test_allowlists.py
@@ -1,9 +1,9 @@
from django_hosts.resolvers import reverse
-from .base import APISubdomainTestCase
-from ..models import AllowList
+from pydis_site.apps.api.models import AllowDenyList
+from pydis_site.apps.api.tests.base import APISubdomainTestCase
-URL = reverse('bot:allowlist-list', host='api')
+URL = reverse('bot:allowdenylist-list', host='api')
JPEG_ALLOWLIST = {
"type": 'FILE_FORMAT',
"allowed": True,
@@ -38,8 +38,8 @@ class EmptyDatabaseTests(APISubdomainTestCase):
class FetchTests(APISubdomainTestCase):
@classmethod
def setUpTestData(cls):
- cls.jpeg_format = AllowList.objects.create(**JPEG_ALLOWLIST)
- cls.png_format = AllowList.objects.create(**PNG_ALLOWLIST)
+ cls.jpeg_format = AllowDenyList.objects.create(**JPEG_ALLOWLIST)
+ cls.png_format = AllowDenyList.objects.create(**PNG_ALLOWLIST)
def test_returns_name_in_list(self):
response = self.client.get(URL)
@@ -83,8 +83,8 @@ class CreationTests(APISubdomainTestCase):
class DeletionTests(APISubdomainTestCase):
@classmethod
def setUpTestData(cls):
- cls.jpeg_format = AllowList.objects.create(**JPEG_ALLOWLIST)
- cls.png_format = AllowList.objects.create(**PNG_ALLOWLIST)
+ cls.jpeg_format = AllowDenyList.objects.create(**JPEG_ALLOWLIST)
+ cls.png_format = AllowDenyList.objects.create(**PNG_ALLOWLIST)
def test_deleting_unknown_id_returns_404(self):
response = self.client.delete(f"{URL}/200")