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

Method test_get_params

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

Source from the content-addressed store, hash-verified

422 self.assertEqual(msg.get_boundary(), None)
423
424 def test_get_params(self):
425 eq = self.assertEqual
426 msg = email.message_from_string(
427 'X-Header: foo=one; bar=two; baz=three\n')
428 eq(msg.get_params(header='x-header'),
429 [('foo', 'one'), ('bar', 'two'), ('baz', 'three')])
430 msg = email.message_from_string(
431 'X-Header: foo; bar=one; baz=two\n')
432 eq(msg.get_params(header='x-header'),
433 [('foo', ''), ('bar', 'one'), ('baz', 'two')])
434 eq(msg.get_params(), None)
435 msg = email.message_from_string(
436 'X-Header: foo; bar="one"; baz=two\n')
437 eq(msg.get_params(header='x-header'),
438 [('foo', ''), ('bar', 'one'), ('baz', 'two')])
439
440 # test_headerregistry.TestContentTypeHeader.spaces_around_param_equals
441 def test_get_param_liberal(self):

Callers

nothing calls this directly

Calls 2

eqFunction · 0.85
get_paramsMethod · 0.80

Tested by

no test coverage detected