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

Method test_missing_final_slash

Lib/test/test_http_cookiejar.py:1255–1263  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1253 self.assertEqual(h, r'$Version=1; foo=\\b\"a\"r')
1254
1255 def test_missing_final_slash(self):
1256 # Missing slash from request URL's abs_path should be assumed present.
1257 url = "http://www.acme.com"
1258 c = CookieJar(DefaultCookiePolicy(rfc2965=True))
1259 interact_2965(c, url, "foo=bar; Version=1")
1260 req = urllib.request.Request(url)
1261 self.assertEqual(len(c), 1)
1262 c.add_cookie_header(req)
1263 self.assertTrue(req.has_header("Cookie"))
1264
1265 def test_domain_mirror(self):
1266 pol = DefaultCookiePolicy(rfc2965=True)

Callers

nothing calls this directly

Calls 7

add_cookie_headerMethod · 0.95
has_headerMethod · 0.95
CookieJarClass · 0.90
DefaultCookiePolicyClass · 0.90
interact_2965Function · 0.85
assertTrueMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected