Skip to content
Myr

Add cookie policy related tests

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

authored by Laurent Bachelier · committed by Nate Prewitt · parent 3ef4927 · Browse files · 1 file+8 added−0 removed
This commit

State

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

Diff stats

1 file+8 added−0 removed

  • tests:+8 added−0 removed

1 file+8 added−0 removed

modified:tests/test_requests.py+8 added
1169 unmodified lines
1170 jar.set(key, value)1171 with pytest.raises(requests.cookies.CookieConflictError):1172 jar.get(key)11731174 def test_cookie_policy_copy(self):1175 class MyCookiePolicy(cookielib.DefaultCookiePolicy):1176 pass11771178 jar = requests.cookies.RequestsCookieJar()1179 jar.set_policy(MyCookiePolicy())1180 assert isinstance(jar.copy()._policy, MyCookiePolicy)11811182 def test_time_elapsed_blank(self, httpbin):1183 r = requests.get(httpbin('get'))1184 td = r.elapsed1185 total_seconds = ((td.microseconds + (td.seconds + td.days * 24 * 3600) * 10**6) / 10**6)
1290 unmodified lines