

def test_full_flow(self):
    rv = self.client.post(authorize_url, data={
        'confirm': 'yes',
    })
    rv = self.client.get(clean_url(rv.location))
    assert (b'access_token' in rv.data)
    rv = self.client.get('/')
    assert (b'username' in rv.data)
    rv = self.client.get('/address')
    assert (rv.status_code == 401)
    assert (b'message' in rv.data)
    rv = self.client.get('/method/post')
    assert (b'POST' in rv.data)
    rv = self.client.get('/method/put')
    assert (b'PUT' in rv.data)
    rv = self.client.get('/method/delete')
    assert (b'DELETE' in rv.data)

dataset/ETHPy150Open lepture/flask-oauthlib/tests/oauth2/test_oauth2.py TestWebAuth.test_full_flow/original