How to use the arsenic.services.auth_or_string function in arsenic

To help you get started, we’ve selected a few arsenic examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github HDE / arsenic / tests / test_utils.py View on Github external
def test_auth_string():
    assert auth_or_string("hello:world") == BasicAuth("hello", "world")
    assert auth_or_string(None) == None
    assert auth_or_string(BasicAuth("foo", "bar")) == BasicAuth("foo", "bar")
    with pytest.raises(TypeError):
        auth_or_string(1)
github HDE / arsenic / tests / test_utils.py View on Github external
def test_auth_string():
    assert auth_or_string("hello:world") == BasicAuth("hello", "world")
    assert auth_or_string(None) == None
    assert auth_or_string(BasicAuth("foo", "bar")) == BasicAuth("foo", "bar")
    with pytest.raises(TypeError):
        auth_or_string(1)
github HDE / arsenic / tests / test_utils.py View on Github external
def test_auth_string():
    assert auth_or_string("hello:world") == BasicAuth("hello", "world")
    assert auth_or_string(None) == None
    assert auth_or_string(BasicAuth("foo", "bar")) == BasicAuth("foo", "bar")
    with pytest.raises(TypeError):
        auth_or_string(1)
github HDE / arsenic / tests / test_utils.py View on Github external
def test_auth_string():
    assert auth_or_string("hello:world") == BasicAuth("hello", "world")
    assert auth_or_string(None) == None
    assert auth_or_string(BasicAuth("foo", "bar")) == BasicAuth("foo", "bar")
    with pytest.raises(TypeError):
        auth_or_string(1)