(self)
| 1151 | self.assertEqual(f.readlines(), []) |
| 1152 | |
| 1153 | def test_get_bytes_from(self): |
| 1154 | # Get bytes representations of messages with _unixfrom. |
| 1155 | unixfrom = 'From foo@bar blah\n' |
| 1156 | key0 = self._box.add(unixfrom + self._template % 0) |
| 1157 | key1 = self._box.add(unixfrom + _sample_message) |
| 1158 | self.assertEqual(self._box.get_bytes(key0, from_=False), |
| 1159 | (self._template % 0).encode('ascii')) |
| 1160 | self.assertEqual(self._box.get_bytes(key1, from_=False), |
| 1161 | _bytes_sample_message) |
| 1162 | self.assertEqual(self._box.get_bytes(key0, from_=True), |
| 1163 | (unixfrom + self._template % 0).encode('ascii')) |
| 1164 | self.assertEqual(self._box.get_bytes(key1, from_=True), |
| 1165 | unixfrom.encode('ascii') + _bytes_sample_message) |
| 1166 | |
| 1167 | def test_get_string_from(self): |
| 1168 | # Get string representations of messages with _unixfrom. |
nothing calls this directly
no test coverage detected