Skip to content
Myr

Merge pull request #1145 from sigmavirus24/master

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

Mock the links test

authored by Kenneth Reitz · committed by Kenneth Reitz · parents 9d1d927, 250896b · Browse files · 1 file+21 added−2 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+21 added−2 removed

  • other:+21 added−2 removed

1 file+21 added−2 removed

modified:test_requests.py+21 added-2 removed
280 unmodified lines
281282 self.assertTrue(hasattr(resp, 'hook_working'))283284 def test_links(self):285 url = 'https://api.github.com/users/kennethreitz/repos?page=1&per_page=10'286 r = requests.head(url=url)285 r = requests.Response()286 r.headers = {287 'cache-control': 'public, max-age=60, s-maxage=60',288 'connection': 'keep-alive',289 'content-encoding': 'gzip',290 'content-type': 'application/json; charset=utf-8',291 'date': 'Sat, 26 Jan 2013 16:47:56 GMT',292 'etag': '"6ff6a73c0e446c1f61614769e3ceb778"',293 'last-modified': 'Sat, 26 Jan 2013 16:22:39 GMT',294 'link': ('<https://api.github.com/users/kennethreitz/repos?'295 'page=2&per_page=10>; rel="next", <https://api.github.'296 'com/users/kennethreitz/repos?page=7&per_page=10>; '297 ' rel="last"'),298 'server': 'GitHub.com',299 'status': '200 OK',300 'vary': 'Accept',301 'x-content-type-options': 'nosniff',302 'x-github-media-type': 'github.beta',303 'x-ratelimit-limit': '60',304 'x-ratelimit-remaining': '57'305 }306 self.assertEqual(r.links['next']['rel'], 'next')307308 def test_cookie_parameters(self):309 key = 'some_cookie'
18 unmodified lines