aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site
diff options
context:
space:
mode:
Diffstat (limited to 'pydis_site')
-rw-r--r--pydis_site/apps/api/tests/test_github_webhook_filter.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pydis_site/apps/api/tests/test_github_webhook_filter.py b/pydis_site/apps/api/tests/test_github_webhook_filter.py
index 8ca60511..a2a00d4c 100644
--- a/pydis_site/apps/api/tests/test_github_webhook_filter.py
+++ b/pydis_site/apps/api/tests/test_github_webhook_filter.py
@@ -44,8 +44,10 @@ class GitHubWebhookFilterAPITests(APITestCase):
context_mock.read.return_value = b'{"status": "ok"}'
response = self.client.post(url, data=payload, headers=headers)
- self.assertEqual(response.status_code, context_mock.status)
- self.assertEqual(response.headers.get('X-Clacks-Overhead'), 'Joe Armstrong')
+ response_body = response.json()
+ self.assertEqual(response.status_code, 200)
+ self.assertEqual(response_body.get("headers", {}).get("X-Clacks-Overhead"), 'Joe Armstrong')
+ self.assertEqual(response_body.get("original_status"), 299)
def test_rate_limit_is_logged_to_sentry(self):
url = reverse('api:github-webhook-filter', args=('id', 'token'))