MCPcopy
hub / github.com/psf/requests / test_cookie_as_dict_keeps_len

Method test_cookie_as_dict_keeps_len

tests/test_requests.py:1290–1308  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1288 assert cookie._rest["HttpOnly"] == rest["HttpOnly"]
1289
1290 def test_cookie_as_dict_keeps_len(self):
1291 key = "some_cookie"
1292 value = "some_value"
1293
1294 key1 = "some_cookie1"
1295 value1 = "some_value1"
1296
1297 jar = requests.cookies.RequestsCookieJar()
1298 jar.set(key, value)
1299 jar.set(key1, value1)
1300
1301 d1 = dict(jar)
1302 d2 = dict(jar.iteritems())
1303 d3 = dict(jar.items())
1304
1305 assert len(jar) == 2
1306 assert len(d1) == 2
1307 assert len(d2) == 2
1308 assert len(d3) == 2
1309
1310 def test_cookie_as_dict_keeps_items(self):
1311 key = "some_cookie"

Callers

nothing calls this directly

Calls 3

setMethod · 0.95
iteritemsMethod · 0.95
itemsMethod · 0.95

Tested by

no test coverage detected