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
def test_default_port(url, netloc): # type: (str, tuple) -> None config = Config({'url': url, 'username': '******', 'password': '******'}) assert config.netloc == netloc
def test_config_errors(instance, match): # type: (Instance, str) -> None with pytest.raises(ConfigurationError, match=match): Config(instance)