(self)
| 1199 | key = self._box.add(msg) |
| 1200 | |
| 1201 | def test_open_close_open(self): |
| 1202 | # Open and inspect previously-created mailbox |
| 1203 | values = [self._template % i for i in range(3)] |
| 1204 | for value in values: |
| 1205 | self._box.add(value) |
| 1206 | self._box.close() |
| 1207 | mtime = os.path.getmtime(self._path) |
| 1208 | self._box = self._factory(self._path) |
| 1209 | self.assertEqual(len(self._box), 3) |
| 1210 | for key in self._box.iterkeys(): |
| 1211 | self.assertIn(self._box.get_string(key), values) |
| 1212 | self._box.close() |
| 1213 | self.assertEqual(mtime, os.path.getmtime(self._path)) |
| 1214 | |
| 1215 | def test_add_and_close(self): |
| 1216 | # Verifying that closing a mailbox doesn't change added items |
nothing calls this directly
no test coverage detected