From a3bd6568770b54da21147d386f3cadbdd265f69e Mon Sep 17 00:00:00 2001 From: RohanJnr Date: Wed, 7 Oct 2020 09:56:31 +0530 Subject: add test case for insufficient data while bulk updating users. --- pydis_site/apps/api/tests/test_users.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'pydis_site') diff --git a/pydis_site/apps/api/tests/test_users.py b/pydis_site/apps/api/tests/test_users.py index fb22c627..52f5d213 100644 --- a/pydis_site/apps/api/tests/test_users.py +++ b/pydis_site/apps/api/tests/test_users.py @@ -251,6 +251,20 @@ class MultiPatchTests(APISubdomainTestCase): response = self.client.patch(url, data=data) self.assertEqual(response.status_code, 400) + def test_returns_400_for_insufficient_data(self): + url = reverse("bot:user-bulk-patch", host="api") + data = [ + { + "id": 1, + + }, + { + "id": 2, + } + ] + response = self.client.patch(url, data=data) + self.assertEqual(response.status_code, 400) + class UserModelTests(APISubdomainTestCase): @classmethod -- cgit v1.2.3