aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps/api/tests
diff options
context:
space:
mode:
authorGravatar Johannes Christ <[email protected]>2021-10-06 23:20:56 +0200
committerGravatar Johannes Christ <[email protected]>2021-10-06 23:22:45 +0200
commitce75197fc1d0b2086631277d29f9396908bdc86c (patch)
tree2eab9855ab1a83352a5d83050d8a1fc0524f3285 /pydis_site/apps/api/tests
parentMerge branch 'main' into subdomains-to-query-paths (diff)
parentMerge pull request #599 from python-discord/fix-http-links (diff)
Merge branch 'master' into subdomains-to-query-paths
Diffstat (limited to 'pydis_site/apps/api/tests')
-rw-r--r--pydis_site/apps/api/tests/test_users.py10
-rw-r--r--pydis_site/apps/api/tests/test_validators.py2
2 files changed, 6 insertions, 6 deletions
diff --git a/pydis_site/apps/api/tests/test_users.py b/pydis_site/apps/api/tests/test_users.py
index bed6342e..77876d6f 100644
--- a/pydis_site/apps/api/tests/test_users.py
+++ b/pydis_site/apps/api/tests/test_users.py
@@ -5,7 +5,7 @@ from django.urls import reverse
from .base import AuthenticatedAPITestCase
from ..models import Role, User
-from ..models.bot.metricity import NotFound
+from ..models.bot.metricity import NotFoundError
class UnauthedUserAPITests(AuthenticatedAPITestCase):
@@ -501,7 +501,7 @@ class UserMetricityTests(AuthenticatedAPITestCase):
self.metricity = patcher.start()
self.addCleanup(patcher.stop)
self.metricity = self.metricity.return_value.__enter__.return_value
- self.metricity.user.side_effect = NotFound()
- self.metricity.total_messages.side_effect = NotFound()
- self.metricity.total_message_blocks.side_effect = NotFound()
- self.metricity.top_channel_activity.side_effect = NotFound()
+ self.metricity.user.side_effect = NotFoundError()
+ self.metricity.total_messages.side_effect = NotFoundError()
+ self.metricity.total_message_blocks.side_effect = NotFoundError()
+ self.metricity.top_channel_activity.side_effect = NotFoundError()
diff --git a/pydis_site/apps/api/tests/test_validators.py b/pydis_site/apps/api/tests/test_validators.py
index 8bb7b917..551cc2aa 100644
--- a/pydis_site/apps/api/tests/test_validators.py
+++ b/pydis_site/apps/api/tests/test_validators.py
@@ -72,7 +72,7 @@ class TagEmbedValidatorTests(TestCase):
def test_rejects_too_long_description(self):
with self.assertRaises(ValidationError):
validate_embed({
- 'description': 'd' * 2049
+ 'description': 'd' * 4097
})
def test_allows_valid_embed(self):