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

Method test_get_message

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

Source from the content-addressed store, hash-verified

258 self.assertRaises(KeyError, lambda: self._box[key0])
259
260 def test_get_message(self):
261 # Get Message representations of messages
262 key0 = self._box.add(self._template % 0)
263 key1 = self._box.add(_sample_message)
264 msg0 = self._box.get_message(key0)
265 self.assertIsInstance(msg0, mailbox.Message)
266 self.assertEqual(msg0['from'], 'foo')
267 self.assertEqual(msg0.get_payload(), '0\n')
268 self._check_sample(self._box.get_message(key1))
269
270 def test_get_bytes(self):
271 # Get bytes representations of messages

Callers

nothing calls this directly

Calls 6

assertIsInstanceMethod · 0.80
get_payloadMethod · 0.80
_check_sampleMethod · 0.80
addMethod · 0.45
get_messageMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected