def test_refresh_token_fails_no_auth(): client = AcmeClient() with pytest.raises(ClientUnauthorizedException): client.refresh_token(None)
def test_refresh_token_success(): client = AcmeClient() client.login(user, pwd) data = client.refresh_token(client.refresh_token_value) assert 'access_token' in data and 'access_token_expires' in data