Increased test coverage for app and updated .gitignore

Change-Id: Ib8ad16a04682674c52d97fbe80ae7ccf62648b74
This commit is contained in:
Chelsea Winfree 2014-06-30 15:15:57 -05:00
parent 97380c65e6
commit 48dc10e013
2 changed files with 23 additions and 0 deletions

3
.gitignore vendored
View File

@ -59,3 +59,6 @@ ChangeLog
# Editors
*~
.*.swp
# Mac OS
.DS_Store

View File

@ -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):