Merge "Fix issue in test_forbidden_action_exposure."
This commit is contained in:
commit
bca6818d64
@ -114,10 +114,11 @@ class SecurityErrorTestCase(ExceptionTestCase):
|
|||||||
CONF.debug = False
|
CONF.debug = False
|
||||||
|
|
||||||
risky_info = uuid.uuid4().hex
|
risky_info = uuid.uuid4().hex
|
||||||
|
action = uuid.uuid4().hex
|
||||||
e = exception.ForbiddenAction(message=risky_info)
|
e = exception.ForbiddenAction(message=risky_info, action=action)
|
||||||
self.assertValidJsonRendering(e)
|
self.assertValidJsonRendering(e)
|
||||||
self.assertNotIn(risky_info, str(e))
|
self.assertNotIn(risky_info, str(e))
|
||||||
|
self.assertIn(action, str(e))
|
||||||
|
|
||||||
e = exception.ForbiddenAction(action=risky_info)
|
e = exception.ForbiddenAction(action=risky_info)
|
||||||
self.assertValidJsonRendering(e)
|
self.assertValidJsonRendering(e)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user