diff --git a/.gitignore b/.gitignore index f86567768..10904852d 100644 --- a/.gitignore +++ b/.gitignore @@ -59,3 +59,6 @@ ChangeLog # Editors *~ .*.swp + +# Mac OS +.DS_Store diff --git a/barbican/tests/api/test_resources.py b/barbican/tests/api/test_resources.py index 767885c5c..757848ca3 100644 --- a/barbican/tests/api/test_resources.py +++ b/barbican/tests/api/test_resources.py @@ -1166,6 +1166,26 @@ class WhenCreatingOrdersUsingOrdersResource(FunctionalTest): ) self.assertEqual(resp.status_int, 400) + def test_should_fail_add_new_order_unsupported_field(self): + # Using unsupported algorithm field for this test + self.unsupported_req = { + 'secret': { + 'name': self.secret_name, + 'payload_content_type': + self.secret_payload_content_type, + 'algorithm': "not supported", + 'bit_length': self.secret_bit_length, + 'mode': self.secret_mode + } + } + resp = self.app.post_json( + '/%s/orders/' % self.tenant_keystone_id, + self.unsupported_req, + expect_errors=True + ) + + self.assertEqual(resp.status_int, 400) + class WhenGettingOrdersListUsingOrdersResource(FunctionalTest): def setUp(self):