Beispiel #1
0
def test_username_override(monkeypatch):
    with fake_server(monkeypatch):
        client = _Client(site='unit_test', username='******')
        username = client._username()
        assert username == 'foobar'
Beispiel #2
0
def test_specify_token_and_log_level(monkeypatch):
    import logging
    client = _Client(token='134', log_level=logging.ERROR)
    assert client._api.token == '134'
Beispiel #3
0
def test_username(monkeypatch):
    with fake_server(monkeypatch):
        client = _Client(site='unit_test')
        username = client._username()
        assert username == 'fake_username'