Пример #1
0
 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')
Пример #2
0
 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')