def test_dispatch_value_error(self):
"""Tests that ValueError raised by dispatch stub is handled properly."""
error = ValueError('Invalid Token', httplib.BAD_REQUEST)
stub_dispatcher.dispatch(mox.IgnoreArg(), mox.IgnoreArg(), mox.IgnoreArg(),
mox.IgnoreArg()).AndRaise(error)
self.run_request('GET', {}, '/_ah/some_bucket', '', '',
'400 Bad Request', [], 'Invalid Token')
评论列表
文章目录