def test_get_tokens_bad_credentials(client):
    'Test getting access and refresh tokens using invalid credentials'
    with pytest.raises(CredentialsFailedError):
        client._get_tokens(client.username, 'foo')
Test getting access and refresh tokens using invalid credentials
def test_get_tokens_bad_credentials(client):
    
    with pytest.raises(CredentialsFailedError):
        client._get_tokens(client.username, 'foo')