MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_crlf_separation

Method test_crlf_separation

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

Source from the content-addressed store, hash-verified

4073 eq(msg.get_payload(), "Here's the message body\n")
4074
4075 def test_crlf_separation(self):
4076 eq = self.assertEqual
4077 with openfile('msg_26.txt', encoding="utf-8", newline='\n') as fp:
4078 msg = Parser().parse(fp)
4079 eq(len(msg.get_payload()), 2)
4080 part1 = msg.get_payload(0)
4081 eq(part1.get_content_type(), 'text/plain')
4082 eq(part1.get_payload(), 'Simple email with attachment.\r\n\r\n')
4083 part2 = msg.get_payload(1)
4084 eq(part2.get_content_type(), 'application/riscos')
4085
4086 def test_crlf_flatten(self):
4087 # Using newline='\n' preserves the crlfs in this input file.

Callers

nothing calls this directly

Calls 7

openfileFunction · 0.90
ParserClass · 0.90
lenFunction · 0.85
get_payloadMethod · 0.80
get_content_typeMethod · 0.80
eqFunction · 0.50
parseMethod · 0.45

Tested by

no test coverage detected