diff options
author | 2020-10-07 09:56:31 +0530 | |
---|---|---|
committer | 2020-10-07 09:56:31 +0530 | |
commit | a3bd6568770b54da21147d386f3cadbdd265f69e (patch) | |
tree | efb42ebf461cff2dcd627b8d0bc497ef92e059bc /pydis_site/apps | |
parent | add check for insufficient data in update method of UserListSerializer (diff) |
add test case for insufficient data while bulk updating users.
Diffstat (limited to 'pydis_site/apps')
-rw-r--r-- | pydis_site/apps/api/tests/test_users.py | 14 |
1 files changed, 14 insertions, 0 deletions
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 |