• Home
  • Raw
  • Download

Lines Matching refs:key0

193         key0 = self._box.add(self._template % 0)
196 method(key0)
198 self.assertRaises(KeyError, lambda: self._box[key0])
199 self.assertRaises(KeyError, lambda: method(key0))
215 key0 = self._box.add(self._template % 0)
218 self._box.discard(key0)
220 self.assertRaises(KeyError, lambda: self._box[key0])
221 self._box.discard(key0)
223 self.assertRaises(KeyError, lambda: self._box[key0])
227 key0 = self._box.add(self._template % 0)
228 msg = self._box.get(key0)
242 key0 = self._box.add(self._template % 0)
243 msg = self._box[key0]
247 self._box.discard(key0)
248 self.assertRaises(KeyError, lambda: self._box[key0])
252 key0 = self._box.add(self._template % 0)
254 msg0 = self._box.get_message(key0)
262 key0 = self._box.add(self._template % 0)
264 self.assertEqual(self._box.get_bytes(key0),
270 key0 = self._box.add(self._template % 0)
272 self.assertEqual(self._box.get_string(key0), self._template % 0)
278 key0 = self._box.add(self._template % 0)
280 with self._box.get_file(key0) as file:
357 key0 = self._box.add(self._template % 0)
358 self.assertIn(key0, self._box)
362 self.assertIn(key0, self._box)
364 self._box.remove(key0)
365 self.assertNotIn(key0, self._box)
370 self.assertNotIn(key0, self._box)
387 key0 = self._box.add(self._template % 'original 0')
388 self.assertEqual(self._box.get_string(key0),
393 self._box[key0] = self._template % 'changed 0'
394 self.assertEqual(self._box.get_string(key0),
399 self._box[key0] = _sample_message
400 self._check_sample(self._box[key0])
401 self._box[key1] = self._box[key0]
403 self._box[key0] = self._template % 'original 0'
404 self.assertEqual(self._box.get_string(key0),
426 key0 = self._box.add(self._template % 0)
427 self.assertIn(key0, self._box)
430 self.assertEqual(self._box.pop(key0).get_payload(), '0\n')
431 self.assertNotIn(key0, self._box)
460 key0 = self._box.add(self._template % 'original 0')
463 self._box.update({key0: self._template % 'changed 0',
466 self.assertEqual(self._box.get_string(key0),
473 (key0, self._template % 'original 0')])
475 self.assertEqual(self._box.get_string(key0),
483 key0: self._template % "changed 0"}))
485 self.assertEqual(self._box.get_string(key0),
790 key0 = self._box.add(self._template % 0)
794 self.assertEqual(self._box._toc, {key0: os.path.join('new', key0),
797 self.assertEqual(self._box._toc, {key0: os.path.join('new', key0),
800 self.assertEqual(self._box._toc, {key0: os.path.join('new', key0),
808 key0 = self._box.add(self._template % 0)
821 self.assertEqual(sorted(self._box._toc.keys()), sorted([key0, key1]))
826 key0 = self._box.add(self._template % 0)
827 self.assertEqual(self._box._lookup(key0), os.path.join('new', key0))
828 os.remove(os.path.join(self._path, 'new', key0))
829 self.assertEqual(self._box._toc, {key0: os.path.join('new', key0)})
833 self.assertRaises(KeyError, lambda: self._box._lookup(key0))
992 key0 = self._box.add(unixfrom + self._template % 0)
994 self.assertEqual(self._box.get_bytes(key0, from_=False),
998 self.assertEqual(self._box.get_bytes(key0, from_=True),
1006 key0 = self._box.add(unixfrom + self._template % 0)
1008 self.assertEqual(self._box.get_string(key0, from_=False),
1012 self.assertEqual(self._box.get_string(key0, from_=True),
1226 key0 = self._box.add(msg0)
1227 self.assertEqual(self._box.get_sequences(), {'foo':[key0]})
1232 {'foo':[key0, key1], 'bar':[key1], 'replied':[key1]})
1234 self._box[key0] = msg0
1237 'flagged':[key0]})
1239 self.assertEqual(self._box.get_sequences(), {'flagged':[key0]})
1244 key0 = self._box.add(msg0)
1245 refmsg0 = self._box.get_message(key0)
1249 key0 = self._box.add(msg0)
1251 self._box.remove(key0)
1264 key0 = self._box.add(msg0)
1269 {'foo':[key0,key1,key2,key3], 'unseen':[key0],
1273 {'foo':[key0,key1,key3], 'unseen':[key0], 'bar':[key3],
1277 key0 = key0
1278 key1 = key0 + 1
1284 key0 = self._box.add(msg1)
1289 self._box.remove(key0)
1322 key0 = self._box.add(msg0)
1329 self._box[key0] = msg0