def test_me_endpoint_returns_failure(self):
"""Assert that the me endpoint returns failure.
When an invalid key is passed in.
"""
with app.test_client() as client:
with client.session_transaction() as session:
session['access_token'] = 'NOT_A_CODE'
with Betamax(app.requests_session).use_cassette('me_failure'):
response = client.get('/me')
self.assertEquals(response.status_code, 401)
评论列表
文章目录