(self)
| 1185 | key = self._box.add(msg) |
| 1186 | |
| 1187 | def test_open_close_open(self): |
| 1188 | # Open and inspect previously-created mailbox |
| 1189 | values = [self._template % i for i in range(3)] |
| 1190 | for value in values: |
| 1191 | self._box.add(value) |
| 1192 | self._box.close() |
| 1193 | mtime = os.path.getmtime(self._path) |
| 1194 | self._box = self._factory(self._path) |
| 1195 | self.assertEqual(len(self._box), 3) |
| 1196 | for key in self._box.iterkeys(): |
| 1197 | self.assertIn(self._box.get_string(key), values) |
| 1198 | self._box.close() |
| 1199 | self.assertEqual(mtime, os.path.getmtime(self._path)) |
| 1200 | |
| 1201 | def test_add_and_close(self): |
| 1202 | # Verifying that closing a mailbox doesn't change added items |
nothing calls this directly
no test coverage detected