def test_exchange_fails_if_no_code(self):
payload = (b'{'
b' "access_token":"SlAV32hkKG",'
b' "refresh_token":"8xLOxBtZp8"'
b'}')
http = http_mock.HttpMock(data=payload)
code = {'error': 'thou shall not pass'}
with self.assertRaisesRegexp(
client.FlowExchangeError, 'shall not pass'):
self.flow.step2_exchange(code=code, http=http)
评论列表
文章目录