示例#1
0
def test_client_ok(account_creds):
    client = Client(domain=account_creds["domain"],
                    api_key=account_creds["api_key"])
    alive, error = client.health_check()

    assert alive
    assert not error
示例#2
0
def test_client_wrong_cred(account_creds):
    client = Client(domain=account_creds["domain"], api_key="wrong_key")
    alive, error = client.health_check()

    assert not alive
    assert error == "Invalid credentials"
示例#3
0
def test_client_wrong_account(unknown_account):
    client = Client(domain=unknown_account, api_key="wrong_key")
    alive, error = client.health_check()

    assert not alive
    assert error == "Invalid credentials"