Did I find the right examples for you? yes no

All Samples(17)  |  Call(17)  |  Derive(0)  |  Import(0)

src/u/r/uricore-HEAD/tests/cases.py   uricore(Download)
    def test_join_path_to_netloc(self):
        ri = self.RI('http://localhost:8000').join(self.RI('/path/to/file'))
        self.assertEquals(ri.scheme, 'http')
        self.assertEquals(ri.netloc, 'localhost:8000')
        self.assertEquals(ri.path, '/path/to/file')
 
    def test_join_path_to_path(self):
        ri = self.RI('http://localhost:8000/here/is/the').join(self.RI('/path/to/file'))
    def test_join_fragment_and_path(self):
        ri = self.RI('http://localhost:8000/here/is/the').join(self.RI('/thing#fragment'))
        self.assertEquals(ri.path, '/here/is/the/thing')
        self.assertEquals(ri.fragment, 'fragment')
 
    def test_join_query_to_path(self):
        ri = self.RI('http://localhost:8000/path/to/file').join(self.RI('?yes=no&left=right'))
    def test_join_query_to_query(self):
        ri = self.RI('http://localhost:8000/path/to/file?yes=no').join(self.RI('?left=right'))
        self.assertEquals(ri.path, '/path/to/file')
        self.assertEquals(ri.query, MultiDict(dict(yes='no', left='right')))
        self.assertEquals(ri.querystr, 'yes=no&left=right')