Skip to content
Myr

add Python 3 compatibility

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Shivaram Lingamneni · committed by Shivaram Lingamneni · parent 7832f2a · Browse files · 2 files+3 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+3 added−3 removed

  • tests:+1 added−1 removed
  • other:+2 added−2 removed

2 files+3 added−3 removed

modified:requests/cookies.py+2 added-2 removed
257 unmodified lines
258 if cookiejar is None:259 cookiejar = RequestsCookieJar()260261 if cookie_dict is not None:262 for name, value in cookie_dict.iteritems():263 cookiejar.set_cookie(create_cookie(name, value))262 for name in cookie_dict:263 cookiejar.set_cookie(create_cookie(name, cookie_dict[name]))264 return cookiejar
modified:tests/test_requests.py+1 added-1 removed
53 unmodified lines
54class TestBaseMixin(object):5556 def assertCookieHas(self, cookie, **kwargs):57 """Assert that a cookie has various specified properties."""58 for attr, expected_value in kwargs.iteritems():58 for attr, expected_value in kwargs.items():59 message = 'Failed comparison for %s' % (attr,)60 self.assertEqual(getattr(cookie, attr), expected_value, message)6162class RequestsTestSuite(TestSetup, TestBaseMixin, unittest.TestCase):
789 unmodified lines