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

Method test_cookie_as_dict_keeps_items

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

Source from the content-addressed store, hash-verified

1308 assert len(d3) == 2
1309
1310 def test_cookie_as_dict_keeps_items(self):
1311 key = "some_cookie"
1312 value = "some_value"
1313
1314 key1 = "some_cookie1"
1315 value1 = "some_value1"
1316
1317 jar = requests.cookies.RequestsCookieJar()
1318 jar.set(key, value)
1319 jar.set(key1, value1)
1320
1321 d1 = dict(jar)
1322 d2 = dict(jar.iteritems())
1323 d3 = dict(jar.items())
1324
1325 assert d1["some_cookie"] == "some_value"
1326 assert d2["some_cookie"] == "some_value"
1327 assert d3["some_cookie1"] == "some_value1"
1328
1329 def test_cookie_as_dict_keys(self):
1330 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