Пример #1
0
 def test_getmany(self):
     "Test getmany"
     data = [self.data(), self.data()]
     ids = filestore.setmany(data, prefix='test')
     self.assertListEqual(filestore.getmany(ids, prefix='test'), data)
Пример #2
0
 def test_sizemany(self):
     "Test sizemany"
     data = [self.data(), self.data()]
     lens = [len(d) for d in data]
     ids = filestore.setmany(data, prefix='test')
     self.assertListEqual(filestore.sizemany(ids, prefix='test'), lens)
Пример #3
0
 def test_setmany(self):
     "Test setmany"
     result = filestore.setmany([self.data(), self.data()], prefix='test')
     self.assertIsInstance(result, list)
     self.assertEqual(len(result), 2)
     self.assertIsInstance(result[0], basestring)