MCPcopy Index your code
hub / github.com/python/cpython / test_url_fragment

Method test_url_fragment

Lib/test/test_urllib2.py:2102–2111  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2100 self.assertEqual("www.python.org", req.host)
2101
2102 def test_url_fragment(self):
2103 req = Request("http://www.python.org/?qs=query#fragment=true")
2104 self.assertEqual("/?qs=query", req.selector)
2105 req = Request("http://www.python.org/#fun=true")
2106 self.assertEqual("/", req.selector)
2107
2108 # Issue 11703: geturl() omits fragment in the original URL.
2109 url = 'http://docs.python.org/library/urllib2.html#OK'
2110 req = Request(url)
2111 self.assertEqual(req.get_full_url(), url)
2112
2113 def test_url_fullurl_get_full_url(self):
2114 urls = ['http://docs.python.org',

Callers

nothing calls this directly

Calls 3

get_full_urlMethod · 0.95
RequestClass · 0.90
assertEqualMethod · 0.45

Tested by

no test coverage detected