MCPcopy Index your code
hub / github.com/python/cpython / test_del_param

Method test_del_param

Lib/test/test_email/test_email.py:530–545  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

528 eq(msg.get_param('charset', header='X-Jimmy'), 'iso-9999-xx')
529
530 def test_del_param(self):
531 eq = self.assertEqual
532 msg = self._msgobj('msg_05.txt')
533 eq(msg.get_params(),
534 [('multipart/report', ''), ('report-type', 'delivery-status'),
535 ('boundary', 'D1690A7AC1.996856090/mail.example.com')])
536 old_val = msg.get_param("report-type")
537 msg.del_param("report-type")
538 eq(msg.get_params(),
539 [('multipart/report', ''),
540 ('boundary', 'D1690A7AC1.996856090/mail.example.com')])
541 msg.set_param("report-type", old_val)
542 eq(msg.get_params(),
543 [('multipart/report', ''),
544 ('boundary', 'D1690A7AC1.996856090/mail.example.com'),
545 ('report-type', old_val)])
546
547 def test_del_param_on_other_header(self):
548 msg = Message()

Callers

nothing calls this directly

Calls 6

eqFunction · 0.85
get_paramsMethod · 0.80
get_paramMethod · 0.80
del_paramMethod · 0.80
set_paramMethod · 0.80
_msgobjMethod · 0.45

Tested by

no test coverage detected