Implement upcoming query on store

This commit is contained in:
lash
2022-03-13 15:40:45 +00:00
parent 51c8124a28
commit a6e48d93a8
7 changed files with 58 additions and 14 deletions

View File

@@ -43,5 +43,15 @@ class TestIntegrateBase(TestShepBase):
self.store.put(b'foo'.hex(), b'bar'.hex(), cache_adapter=MockCacheTokenTx)
def test_state_move(self):
hx = b'foo'.hex()
self.store.put(hx, b'bar'.hex(), cache_adapter=MockCacheTokenTx)
self.store.get(hx)
self.store.enqueue(hx)
v = self.store.upcoming()
self.assertEqual(len(v), 1)
self.assertEqual(v[0], hx)
if __name__ == '__main__':
unittest.main()