(self)
| 1165 | unixfrom.encode('ascii') + _bytes_sample_message) |
| 1166 | |
| 1167 | def test_get_string_from(self): |
| 1168 | # Get string representations of messages with _unixfrom. |
| 1169 | unixfrom = 'From foo@bar blah\n' |
| 1170 | key0 = self._box.add(unixfrom + self._template % 0) |
| 1171 | key1 = self._box.add(unixfrom + _sample_message) |
| 1172 | self.assertEqual(self._box.get_string(key0, from_=False), |
| 1173 | self._template % 0) |
| 1174 | self.assertEqual(self._box.get_string(key1, from_=False).split('\n'), |
| 1175 | _sample_message.split('\n')) |
| 1176 | self.assertEqual(self._box.get_string(key0, from_=True), |
| 1177 | unixfrom + self._template % 0) |
| 1178 | self.assertEqual(self._box.get_string(key1, from_=True).split('\n'), |
| 1179 | (unixfrom + _sample_message).split('\n')) |
| 1180 | |
| 1181 | def test_add_from_string(self): |
| 1182 | # Add a string starting with 'From ' to the mailbox |
nothing calls this directly
no test coverage detected