• Home
  • Raw
  • Download

Lines Matching refs:key1

194         key1 = self._box.add(self._template % 1)
200 self.assertEqual(self._box.get_string(key1), self._template % 1)
207 self.assertEqual(self._box.get_string(key1), self._template % 1)
208 method(key1)
210 self.assertRaises(KeyError, lambda: self._box[key1])
211 self.assertRaises(KeyError, lambda: method(key1))
216 key1 = self._box.add(self._template % 1)
235 key1 = self._box.add(self._template % 1)
236 msg = self._box.get(key1)
253 key1 = self._box.add(_sample_message)
258 self._check_sample(self._box.get_message(key1))
263 key1 = self._box.add(_sample_message)
266 self.assertEqual(self._box.get_bytes(key1), _bytes_sample_message)
271 key1 = self._box.add(_sample_message)
273 self.assertEqual(self._box.get_string(key1).split('\n'),
279 key1 = self._box.add(_sample_message)
282 with self._box.get_file(key1) as file:
360 key1 = self._box.add(self._template % 1)
361 self.assertIn(key1, self._box)
366 self.assertIn(key1, self._box)
368 self._box.remove(key1)
369 self.assertNotIn(key1, self._box)
390 key1 = self._box.add(self._template % 'original 1')
391 self.assertEqual(self._box.get_string(key1),
396 self._box[key1] = self._template % 'changed 1'
397 self.assertEqual(self._box.get_string(key1),
401 self._box[key1] = self._box[key0]
402 self._check_sample(self._box[key1])
406 self._check_sample(self._box[key1])
428 key1 = self._box.add(self._template % 1)
429 self.assertIn(key1, self._box)
432 self.assertIn(key1, self._box)
437 self.assertIn(key1, self._box)
438 self.assertEqual(self._box.pop(key1).get_payload(), '1\n')
439 self.assertNotIn(key1, self._box)
461 key1 = self._box.add(self._template % 'original 1')
468 self.assertEqual(self._box.get_string(key1),
472 (key1, self._template % 'changed 1'),
477 self.assertEqual(self._box.get_string(key1),
487 self.assertEqual(self._box.get_string(key1),
791 key1 = self._box.add(self._template % 1)
795 key1: os.path.join('new', key1)})
798 key1: os.path.join('new', key1)})
801 key1: os.path.join('new', key1),
809 key1 = self._box.add(self._template % 1)
821 self.assertEqual(sorted(self._box._toc.keys()), sorted([key0, key1]))
1078 key1 = self._box.add(msg)
1205 key1 = self._box.add(msg1)
1207 {'foo':[key0, key1], 'bar':[key1], 'replied':[key1]})
1211 {'foo':[key1], 'bar':[key1], 'replied':[key1],
1213 self._box.remove(key1)
1240 key1 = self._box.add(msg1)
1244 {'foo':[key0,key1,key2,key3], 'unseen':[key0],
1248 {'foo':[key0,key1,key3], 'unseen':[key0], 'bar':[key3],
1253 key1 = key0 + 1
1254 key2 = key1 + 1
1260 key1 = self._box.add(msg1)
1301 key1 = self._box.add(msg1)
1307 self._box.remove(key1)