diff options
author | Roberto Hueso Gómez <rhueso@soleta.eu> | 2019-11-13 13:40:18 +0100 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2019-11-13 14:15:58 +0100 |
commit | bbde0c133ce00d084bc909a53fe7faeb7953228a (patch) | |
tree | eca41449a762edf83952077a688ef6a4a44a7f54 /admin/Sources | |
parent | 2f3d7f530978bb47583e93b71246018601cccc40 (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 'admin/Sources')
-rw-r--r-- | admin/Sources/Services/ogAdmServer/tests/units/test_0002_post_clients.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/admin/Sources/Services/ogAdmServer/tests/units/test_0002_post_clients.py b/admin/Sources/Services/ogAdmServer/tests/units/test_0002_post_clients.py index 590d6bab..3e0d4e5d 100644 --- a/admin/Sources/Services/ogAdmServer/tests/units/test_0002_post_clients.py +++ b/admin/Sources/Services/ogAdmServer/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() |