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

Method _check_from

Lib/test/test_mailbox.py:1760–1766  ·  view source on GitHub ↗
(self, msg, sender=None)

Source from the content-addressed store, hash-verified

1758 self._check_sample(msg)
1759
1760 def _check_from(self, msg, sender=None):
1761 # Check contents of "From " line
1762 if sender is None:
1763 sender = "MAILER-DAEMON"
1764 self.assertIsNotNone(re.match(
1765 sender + r" \w{3} \w{3} [\d ]\d [\d ]\d:\d{2}:\d{2} \d{4}",
1766 msg.get_from()))
1767
1768
1769class TestMboxMessage(_TestMboxMMDFMessage, TestMessage):

Callers 2

_post_initialize_hookMethod · 0.95
test_fromMethod · 0.95

Calls 3

assertIsNotNoneMethod · 0.80
get_fromMethod · 0.80
matchMethod · 0.45

Tested by

no test coverage detected