summaryrefslogtreecommitdiffstats
path: root/tests/other/test_curlRequest.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/other/test_curlRequest.py')
-rw-r--r--tests/other/test_curlRequest.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/other/test_curlRequest.py b/tests/other/test_curlRequest.py
index 09d65b385..6bd4a2772 100644
--- a/tests/other/test_curlRequest.py
+++ b/tests/other/test_curlRequest.py
@@ -21,16 +21,19 @@ class TestCurlRequest(TestCase):
def test_cookies(self):
self.req.load(self.cookieURL, cookies=False)
- assert len(self.req.cj.values()) == 0
+ assert len(self.req.cj) == 0
self.req.load(self.cookieURL)
- assert len(self.req.cj.values()) > 0
+ assert len(self.req.cj) > 1
- for c in self.req.load(self.cookieURL + "/cookies.php").splitlines():
- k, v = c.strip().split(":")
+ cookies = dict([c.strip().split(":") for c in self.req.load(self.cookieURL + "/cookies.php").splitlines()])
+ for k, v in cookies.iteritems():
self.assertIn(k, self.req.cj)
self.assertEqual(v, self.req.cj[k].value)
+ for c in self.req.cj:
+ self.assertIn(c, cookies)
+
cookies = self.req.load(self.cookieURL + "/cookies.php", cookies=False)
self.assertEqual(cookies, "")