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

Method test_add_from_bytes

Lib/test/test_mailbox.py:1174–1179  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1172 self.assertEqual(self._box[key].get_payload(), '0\n')
1173
1174 def test_add_from_bytes(self):
1175 # Add a byte string starting with 'From ' to the mailbox
1176 key = self._box.add(b'From foo@bar blah\nFrom: foo\n\n0\n')
1177 self.assertEqual(self._box[key].get_from(), 'foo@bar blah')
1178 self.assertEqual(self._box[key].get_unixfrom(), 'From foo@bar blah')
1179 self.assertEqual(self._box[key].get_payload(), '0\n')
1180
1181 def test_add_mbox_or_mmdf_message(self):
1182 # Add an mboxMessage or MMDFMessage

Callers

nothing calls this directly

Calls 5

get_fromMethod · 0.80
get_unixfromMethod · 0.80
get_payloadMethod · 0.80
addMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected