

def test_revoke_token(self):
    data = self.get_token()
    tok = Token.query.filter_by(refresh_token=data['refresh_token']).first()
    assert (tok.refresh_token == data['refresh_token'])
    revoke_url = '/oauth/revoke'
    args = {
        'token': data['refresh_token'],
    }
    self.client.post(revoke_url, data=args, headers={
        'Authorization': ('Basic %s' % auth_code),
    })
    tok = Token.query.filter_by(refresh_token=data['refresh_token']).first()
    assert (tok is None)

dataset/ETHPy150Open lepture/flask-oauthlib/tests/oauth2/test_oauth2.py TestRevokeToken.test_revoke_token/original