aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site
diff options
context:
space:
mode:
authorGravatar RohanJnr <[email protected]>2020-10-07 09:56:31 +0530
committerGravatar RohanJnr <[email protected]>2020-10-07 09:56:31 +0530
commita3bd6568770b54da21147d386f3cadbdd265f69e (patch)
treeefb42ebf461cff2dcd627b8d0bc497ef92e059bc /pydis_site
parentadd 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')
-rw-r--r--pydis_site/apps/api/tests/test_users.py14
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