Fixing api test PathWithLogdelievery restriction response mismatch

Change-Id: I190d8123063ca3509ac87ac476a01f31a7db00e0
This commit is contained in:
tonytan4ever 2015-07-17 14:19:54 -04:00
parent 8763b5db06
commit 5a2d05e47f
1 changed files with 11 additions and 0 deletions

View File

@ -421,6 +421,17 @@ class TestServicePatchWithLogDelivery(base.TestBase):
patch = jsonpatch.JsonPatch(test_data)
expected_service_details = patch.apply(self.original_service_details)
# Default restriction to whitelist
expected_restrictions = expected_service_details['restrictions']
for restriction in expected_restrictions:
if 'type' not in restriction:
restriction['type'] = 'whitelist'
expected_origin = expected_service_details['origins']
for item in expected_origin:
if 'hostheadertype' not in item:
item['hostheadertype'] = 'domain'
resp = self.client.patch_service(location=self.service_url,
request_body=test_data)
self.assertEqual(resp.status_code, 202)