Example #1
0
def test_base_clean_url_method():
    # good
    url = 'www.google.com'
    assert BaseShortener.clean_url(url) == f'http://{url}'

    # bad
    with pytest.raises(BadURLException):
        BaseShortener.clean_url('http://')
Example #2
0
def test_base_clean_url_method():
    # good
    url = "www.google.com"
    assert BaseShortener.clean_url(url) == f"http://{url}"

    # bad
    with pytest.raises(BadURLException):
        BaseShortener.clean_url("http://")