| 334 | raise |
| 335 | |
| 336 | def test_optional_cr(self): |
| 337 | # Both CRLF and LF should be accepted as separators. CR should not be |
| 338 | # part of the data when followed by LF, but it is a normal char |
| 339 | # otherwise (or should bare CR be an error?) |
| 340 | headers = HTTPHeaders.parse("CRLF: crlf\r\nLF: lf\nCR: cr\rMore: more\r\n") |
| 341 | self.assertEqual( |
| 342 | sorted(headers.get_all()), |
| 343 | [("Cr", "cr\rMore: more"), ("Crlf", "crlf"), ("Lf", "lf")], |
| 344 | ) |
| 345 | |
| 346 | def test_copy(self): |
| 347 | all_pairs = [("A", "1"), ("A", "2"), ("B", "c")] |