summaryrefslogtreecommitdiffstats
path: root/tests/units
diff options
context:
space:
mode:
authorRoberto Hueso Gómez <rhueso@soleta.eu>2019-11-13 13:40:18 +0100
committerOpenGnSys Support Team <soporte-og@soleta.eu>2019-11-13 14:15:58 +0100
commit4d98bdf5f6fb555c13432fbae4d58ce539854487 (patch)
tree07f1d9b2df0a03ebef0a6869318d216c8bbf4b43 /tests/units
parent8fa082d4c58e77b300e459ea09d73fe0db97ead6 (diff)
#915 Test malformed payload for POST /clients
This test covers requests that do not contain 1 of the parameters in their payloads.
Diffstat (limited to 'tests/units')
-rw-r--r--tests/units/test_0002_post_clients.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/units/test_0002_post_clients.py b/tests/units/test_0002_post_clients.py
index 590d6ba..3e0d4e5 100644
--- a/tests/units/test_0002_post_clients.py
+++ b/tests/units/test_0002_post_clients.py
@@ -16,5 +16,9 @@ class TestPostClientsMethods(unittest.TestCase):
returned = requests.post(self.url, headers=self.headers, json=None)
self.assertEqual(returned.status_code, 400)
+ def test_malformed_payload(self):
+ returned = requests.post(self.url, headers=self.headers, json={})
+ self.assertEqual(returned.status_code, 400)
+
if __name__ == '__main__':
unittest.main()