Merge "Fix pep8 error"
This commit is contained in:
commit
ad5089b4c4
|
@ -96,16 +96,12 @@ def check(rule, ctxt, target=None, do_raise=True, exc=None):
|
|||
else:
|
||||
return result
|
||||
finally:
|
||||
extra = {'policy': {'rule': rule, 'target': target}}
|
||||
|
||||
if result:
|
||||
LOG.debug("Policy check succeeded for rule {rule} on target "
|
||||
"{target}".format(rule=rule, target=repr(target),
|
||||
extra=extra))
|
||||
"{target}".format(rule=rule, target=repr(target)))
|
||||
else:
|
||||
LOG.debug("Policy check failed for rule {rule} on target: "
|
||||
"{target}".format(rule=rule, target=repr(target),
|
||||
extra=extra))
|
||||
"{target}".format(rule=rule, target=repr(target)))
|
||||
|
||||
|
||||
def check_is_admin(context):
|
||||
|
|
|
@ -63,7 +63,7 @@ class TestServicesApi(tb.ControllerTest, tb.MuranoApiTestCase):
|
|||
path = "/"
|
||||
|
||||
request = self._post('/v1/environments/{0}/services'.
|
||||
format(environment_id, session_id), b'',
|
||||
format(environment_id), b'',
|
||||
**CREDENTIALS_1)
|
||||
request.headers['X-Configuration-Session'] = str(session_id)
|
||||
request.context.session = session_id
|
||||
|
@ -105,7 +105,7 @@ class TestServicesApi(tb.ControllerTest, tb.MuranoApiTestCase):
|
|||
path = "/"
|
||||
|
||||
request = self._put('/v1/environments/{0}/services'.
|
||||
format(environment_id, session_id), b'',
|
||||
format(environment_id), b'',
|
||||
**CREDENTIALS_1)
|
||||
request.headers['X-Configuration-Session'] = str(session_id)
|
||||
request.context.session = session_id
|
||||
|
@ -149,7 +149,7 @@ class TestServicesApi(tb.ControllerTest, tb.MuranoApiTestCase):
|
|||
# Create service
|
||||
path = '/'
|
||||
request = self._post('/v1/environments/{0}/services'.
|
||||
format(environment_id, session_id), b'',
|
||||
format(environment_id), b'',
|
||||
**CREDENTIALS_1)
|
||||
request.headers['X-Configuration-Session'] = str(session_id)
|
||||
request.context.session = session_id
|
||||
|
@ -202,7 +202,7 @@ class TestServicesApi(tb.ControllerTest, tb.MuranoApiTestCase):
|
|||
# Create service
|
||||
path = '/'
|
||||
request = self._post('/v1/environments/{0}/services'.
|
||||
format(environment_id, session_id), b'',
|
||||
format(environment_id), b'',
|
||||
**CREDENTIALS_1)
|
||||
request.headers['X-Configuration-Session'] = str(session_id)
|
||||
request.context.session = session_id
|
||||
|
|
Loading…
Reference in New Issue