예제 #1
0
def test_fluent_url_parser_invalid_url(url):
    with pytest.raises(ValueError) as error:
        print(FluentLoggerFactory.from_url(url))
    assert str(error.value) == \
        'Invalid URL: "%s".' % (url,)
예제 #2
0
def test_fluent_url_parser(url, host, port, app):
    factory = FluentLoggerFactory.from_url(url)
    assert factory.host == host
    assert factory.port == port
    assert factory.app == app