def test_full_url(request): request.urlparts.scheme = 'https' request.urlparts.hostname = 'foo' request.urlparts.port = 9000 assert mod.full_url('/bar/baz') == 'https://foo:9000/bar/baz'
def test_full_url(request): request.urlparts.scheme = 'http' request.urlparts.hostname = 'foo' request.urlparts.port = None assert mod.full_url('/') == 'http://foo/'
def test_full_url(request): request.urlparts.scheme = "https" request.urlparts.hostname = "foo" request.urlparts.port = 9000 assert mod.full_url("/bar/baz") == "https://foo:9000/bar/baz"
def test_full_url(request): request.urlparts.scheme = "http" request.urlparts.hostname = "foo" request.urlparts.port = None assert mod.full_url("/") == "http://foo/"