| 444 | self.assertEqual(msg.get_param('boundary'), 'CPIMSSMTPC06p5f3tG') |
| 445 | |
| 446 | def test_get_param(self): |
| 447 | eq = self.assertEqual |
| 448 | msg = email.message_from_string( |
| 449 | "X-Header: foo=one; bar=two; baz=three\n") |
| 450 | eq(msg.get_param('bar', header='x-header'), 'two') |
| 451 | eq(msg.get_param('quuz', header='x-header'), None) |
| 452 | eq(msg.get_param('quuz'), None) |
| 453 | msg = email.message_from_string( |
| 454 | 'X-Header: foo; bar="one"; baz=two\n') |
| 455 | eq(msg.get_param('foo', header='x-header'), '') |
| 456 | eq(msg.get_param('bar', header='x-header'), 'one') |
| 457 | eq(msg.get_param('baz', header='x-header'), 'two') |
| 458 | # XXX: We are not RFC-2045 compliant! We cannot parse: |
| 459 | # msg["Content-Type"] = 'text/plain; weird="hey; dolly? [you] @ <\\"home\\">?"' |
| 460 | # msg.get_param("weird") |
| 461 | # yet. |
| 462 | |
| 463 | # test_headerregistry.TestContentTypeHeader.spaces_around_semis |
| 464 | def test_get_param_funky_continuation_lines(self): |