diff options
Diffstat (limited to 'tests/units/test_0019_post_image_create_basic.py')
-rw-r--r-- | tests/units/test_0019_post_image_create_basic.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/units/test_0019_post_image_create_basic.py b/tests/units/test_0019_post_image_create_basic.py index 5e23254..9d05b99 100644 --- a/tests/units/test_0019_post_image_create_basic.py +++ b/tests/units/test_0019_post_image_create_basic.py @@ -30,6 +30,15 @@ class TestPostCreateBasicImageMethods(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) |