コード例 #1
0
def test_custom_tags(instance, tags):
    # type: (Instance, Optional[list]) -> None
    instance = {'url': 'http://localhost:8000', 'username': '******', 'password': '******'}
    if tags is not None:
        instance['tags'] = tags
    config = Config(instance)
    assert config.tags == tags
コード例 #2
0
def test_default_port(url, netloc):
    # type: (str, tuple) -> None
    config = Config({'url': url, 'username': '******', 'password': '******'})
    assert config.netloc == netloc
コード例 #3
0
def test_config_errors(instance, match):
    # type: (Instance, str) -> None
    with pytest.raises(ConfigurationError, match=match):
        Config(instance)