def test_extensions_unexpected_policy_not_authorized_error(self):
@extensions.expected_errors(http.NOT_FOUND)
def fake_func():
raise exception.PolicyNotAuthorized(action="foo")
self.assertRaises(exception.PolicyNotAuthorized, fake_func)
评论列表
文章目录