(self)
| 486 | self.assertRaises(TypeError, Headers, "foo") |
| 487 | |
| 488 | def testExtras(self): |
| 489 | h = Headers() |
| 490 | self.assertEqual(str(h),'\r\n') |
| 491 | |
| 492 | h.add_header('foo','bar',baz="spam") |
| 493 | self.assertEqual(h['foo'], 'bar; baz="spam"') |
| 494 | self.assertEqual(str(h),'foo: bar; baz="spam"\r\n\r\n') |
| 495 | |
| 496 | h.add_header('Foo','bar',cheese=None) |
| 497 | self.assertEqual(h.get_all('foo'), |
| 498 | ['bar; baz="spam"', 'bar; cheese']) |
| 499 | |
| 500 | self.assertEqual(str(h), |
| 501 | 'foo: bar; baz="spam"\r\n' |
| 502 | 'Foo: bar; cheese\r\n' |
| 503 | '\r\n' |
| 504 | ) |
| 505 | |
| 506 | def testRaisesControlCharacters(self): |
| 507 | for c0 in control_characters_c0(): |
nothing calls this directly
no test coverage detected