Closed cdent closed 8 years ago
This fails:
def test_intercept_by_url(): hostname = str(uuid4()) url = 'http://%s/foobar' % hostname interceptor = Httplib2Interceptor(app=app, url=url) assert isinstance(interceptor, Interceptor) assert interceptor.app == app assert interceptor.host == hostname assert interceptor.port == 80 assert interceptor.script_name == '/foobar' assert interceptor.url == 'http://%s:%s/foobar' % (hostname, port) assert interceptor.url == url
with
wsgi_intercept/interceptor.py:35: in __init__ self._init_from_url(url) wsgi_intercept/interceptor.py:70: in _init_from_url host, port = parsed_url.netloc.split(':') E ValueError: need more than 1 value to unpack
Basically that split needs to be safer.
This fails:
with
Basically that split needs to be safer.