Exemplo n.º 1
0
def test_auth_api_can_read_api_keys_with_default_public():
    client = AuthAPIClient(USER1_BASE_URL, DEFAULT_PUBLIC_API_KEY)
    response = client.send('/api/v3/api_keys', 'get')
    assert response.status_code == 200
    assert response.json()['count'] == 1
Exemplo n.º 2
0
def test_auth_api_client_me_endpoint():
    client = AuthAPIClient(USER1_BASE_URL, API_KEY)
    username = client.send('/api/v3/me', 'get').json()['config']['user_name']
    assert username == USER1_USERNAME
Exemplo n.º 3
0
def test_auth_api_can_read_api_keys_with_default_public():
    client = AuthAPIClient(USER1_BASE_URL, DEFAULT_PUBLIC_API_KEY)
    response = client.send('/api/v3/api_keys', 'get')
    assert response.status_code == 200
    assert response.json()['count'] == 1
Exemplo n.º 4
0
def test_auth_api_client_username():
    conf_username = AuthAPIClient(USER1_BASE_URL, API_KEY).username
    assert conf_username == USER1_USERNAME
Exemplo n.º 5
0
def test_auth_api_client_me_endpoint():
    client = AuthAPIClient(USER1_BASE_URL, API_KEY)
    username = client.send('/api/v3/me', 'get').json()['config']['user_name']
    assert username == USER1_USERNAME