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

Method test_get_param_with_quotes

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

Source from the content-addressed store, hash-verified

475
476 # test_headerregistry.TestContentTypeHeader.quotes_inside_rfc2231_value
477 def test_get_param_with_quotes(self):
478 msg = email.message_from_string(
479 'Content-Type: foo; bar*0="baz\\"foobar"; bar*1="\\"baz"')
480 self.assertEqual(msg.get_param('bar'), 'baz"foobar"baz')
481 msg = email.message_from_string(
482 "Content-Type: foo; bar*0=\"baz\\\"foobar\"; bar*1=\"\\\"baz\"")
483 self.assertEqual(msg.get_param('bar'), 'baz"foobar"baz')
484
485 def test_get_param_linear_complexity(self):
486 # Ensure that email.message._parseparam() is fast.

Callers

nothing calls this directly

Calls 2

get_paramMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected