(self)
| 1263 | self.assertTrue(req.has_header("Cookie")) |
| 1264 | |
| 1265 | def test_domain_mirror(self): |
| 1266 | pol = DefaultCookiePolicy(rfc2965=True) |
| 1267 | |
| 1268 | c = CookieJar(pol) |
| 1269 | url = "http://foo.bar.com/" |
| 1270 | interact_2965(c, url, "spam=eggs; Version=1") |
| 1271 | h = interact_2965(c, url) |
| 1272 | self.assertNotIn("Domain", h, |
| 1273 | "absent domain returned with domain present") |
| 1274 | |
| 1275 | c = CookieJar(pol) |
| 1276 | url = "http://foo.bar.com/" |
| 1277 | interact_2965(c, url, 'spam=eggs; Version=1; Domain=.bar.com') |
| 1278 | h = interact_2965(c, url) |
| 1279 | self.assertIn('$Domain=".bar.com"', h, "domain not returned") |
| 1280 | |
| 1281 | c = CookieJar(pol) |
| 1282 | url = "http://foo.bar.com/" |
| 1283 | # note missing initial dot in Domain |
| 1284 | interact_2965(c, url, 'spam=eggs; Version=1; Domain=bar.com') |
| 1285 | h = interact_2965(c, url) |
| 1286 | self.assertIn('$Domain="bar.com"', h, "domain not returned") |
| 1287 | |
| 1288 | def test_path_mirror(self): |
| 1289 | pol = DefaultCookiePolicy(rfc2965=True) |
nothing calls this directly
no test coverage detected