def test_set_tokens_refresh(client):
    'Test setting the tokens using refresh token'
    client.refresh_token = None
    del client.session.headers['Authorization']
    client._set_tokens()
    client._set_tokens()
    assert client.refresh_token
    assert ('Authorization' in client.session.headers)
Test setting the tokens using refresh token
def test_set_tokens_refresh(client):
    
    client.refresh_token = None
    del client.session.headers['Authorization']
    client._set_tokens()
    client._set_tokens()
    assert client.refresh_token
    assert ('Authorization' in client.session.headers)