Skip to content
Myr

Merge pull request #1136 from steveklabnik/test_link_header

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

introduce a test for link headers.

authored by Kenneth Reitz · committed by Kenneth Reitz · parents e21ef54, ccea28d · Browse files · 1 file+5 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+5 added−0 removed

  • other:+5 added−0 removed

1 file+5 added−0 removed

modified:test_requests.py+5 added
263 unmodified lines
264 'text/py-content-type')})265 self.assertEqual(r.status_code, 200)266 self.assertTrue(b"text/py-content-type" in r.request.body)267268 def test_links(self):269 url = 'https://api.github.com/users/kennethreitz/repos?page=1&per_page=10'270 r = requests.head(url=url)271 self.assertEqual(r.links['next']['rel'], 'next')272273274if __name__ == '__main__':275 unittest.main()