def test_rootless_path_authority_error(self): uri = URI('http://example.com') with pytest.raises(ValueError): uri.path = 'foo/bar'
def test_rooted_path_authority_resolution(self): uri = URI('http://example.com/diz') uri.path = '/foo/bar' assert str(uri) == "http://example.com/foo/bar"