summaryrefslogtreecommitdiffstats
path: root/tests/units/test_0018_post_setup.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/units/test_0018_post_setup.py')
-rw-r--r--tests/units/test_0018_post_setup.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/units/test_0018_post_setup.py b/tests/units/test_0018_post_setup.py
index 9d26b85..16fc1d4 100644
--- a/tests/units/test_0018_post_setup.py
+++ b/tests/units/test_0018_post_setup.py
@@ -39,6 +39,15 @@ class TestPostSetupMethods(unittest.TestCase):
returned = requests.post(self.url, headers=self.headers, json=None)
self.assertEqual(returned.status_code, 400)
+ def test_malformed_payload(self):
+ for parameter in self.json:
+ malformed_payload = self.json.copy()
+ malformed_payload.pop(parameter)
+ returned = requests.post(self.url,
+ headers=self.headers,
+ json=malformed_payload)
+ self.assertEqual(returned.status_code, 400)
+
def test_get(self):
returned = requests.get(self.url, headers=self.headers)
self.assertEqual(returned.status_code, 405)