예제 #1
0
    def test_rootless_path_authority_error(self):
        uri = URI('http://example.com')

        with pytest.raises(ValueError):
            uri.path = 'foo/bar'
예제 #2
0
 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"