Ejemplo n.º 1
0
def test_base_expand_method():
    b = BaseShortener()
    url = 'http://httpbin.org/get'
    assert b.expand(url) == url
Ejemplo n.º 2
0
def test_base_expand_method_bad_response():
    b = BaseShortener()
    with pytest.raises(ExpandingErrorException):
        b.expand('http://httpbin.org/status/400')
Ejemplo n.º 3
0
def test_base_expand_method():
    shortener = BaseShortener()
    url = "http://httpbin.org/get"
    assert shortener.expand(url) == url