def test(self): _lv.batch_delete_item(self.connection, "Aaa", [{ "h": self.key(i) } for i in range(100)]) self.assertEqual([], list( _lv.iterate_scan(self.connection, _lv.Scan("Aaa"))))
def test_parallel_scan(self): keys = [] for segment in _lv.parallelize_scan(_lv.Scan("Aaa"), 3): keys.extend(item["h"] for item in _lv.iterate_scan(self.connection, segment)) self.assertEqual(sorted(keys), self.keys)
def test_simple_scan(self): self.assertEqual( sorted(item["h"] for item in _lv.iterate_scan(self.connection, _lv.Scan("Aaa"))), self.keys )
def test(self): _lv.batch_put_item(self.connection, "Aaa", [{"h": self.key(i)} for i in range(100)]) self.assertEqual(len(list(_lv.iterate_scan(self.connection, _lv.Scan("Aaa")))), 100)
def test_parallel_scan(self): keys = [] for segment in _lv.parallelize_scan(_lv.Scan("Aaa"), 3): keys.extend(item["h"] for item in _lv.iterate_scan(self.connection, segment)) self.assertEqual(sorted(keys), self.keys)
def test_simple_scan(self): self.assertEqual( sorted(item["h"] for item in _lv.iterate_scan( self.connection, _lv.Scan("Aaa"))), self.keys)