diff --git a/tests/test_urls.py b/tests/test_urls.py index 9a8d360cd..e1da28e85 100644 --- a/tests/test_urls.py +++ b/tests/test_urls.py @@ -112,6 +112,11 @@ def test_parse_http_link_headers(self): link_header = '; rel="next", ; rel="last"' self.assertEqual(parse_link_header(link_header), parsed_headers) + def test_format_http_link_headers(self): + '''Test HTTP Links formating.''' + parsed_headers = [{'link': 'https://api.github.com/repositories/17914657/issues?page=2', 'rel': 'next'}, {'link': 'https://api.github.com/repositories/17914657/issues?page=11', 'rel': 'last'}] + link_header = '; rel="next", ; rel="last"' + self.assertEqual(format_link_header(parsed_headers), link_header) if __name__ == '__main__': unittest.main()