def test_to_string(self): h = Headers({'Content-type': 'text/html', 'Accept': 'gzip'}) self.assertEqual(h.to_string(), 'Content-Type: text/html\r\nAccept: gzip') h = Headers({'Content-type': ['text/html'], 'Accept': ['gzip']}) self.assertEqual(h.to_string(), 'Content-Type: text/html\r\nAccept: gzip')