From: Steve Klabnik Date: Thu, 24 Jan 2013 01:31:05 +0000 (-0500) Subject: introduce a test for link headers. X-Git-Tag: v1.2.0~70^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ccea28db071e057d161567329d0844357789a5c3;p=services%2Fpython-requests.git introduce a test for link headers. --- diff --git a/test_requests.py b/test_requests.py index 32340ae..d47c8fe 100644 --- a/test_requests.py +++ b/test_requests.py @@ -265,6 +265,11 @@ class RequestsTestCase(unittest.TestCase): self.assertEqual(r.status_code, 200) self.assertTrue(b"text/py-content-type" in r.request.body) + def test_links(self): + url = 'https://api.github.com/users/kennethreitz/repos?page=1&per_page=10' + r = requests.head(url=url) + self.assertEqual(r.links['next']['rel'], 'next') + if __name__ == '__main__': unittest.main()