commit 97fbec647734ff2a4a74f78380da15e1ef82c400
parent 2a9bf41cf5940432ad2b1dc9b7d425e2da6492ba
Author: lash <dev@holbrook.no>
Date: Mon, 9 May 2022 19:40:41 +0000
Rehabilitate tests after by state signature change
Diffstat:
4 files changed, 8 insertions(+), 12 deletions(-)
diff --git a/chainqueue/store/base.py b/chainqueue/store/base.py
@@ -161,7 +161,7 @@ class Store:
def pending(self, limit=4096):
- return self.by_state(state=0, limit=limit, strict=True)
+ return self.by_state(include_pending=True, limit=limit, strict=True)
def reserve(self, k):
diff --git a/requirements.txt b/requirements.txt
@@ -1,9 +1,5 @@
-#pysha3==1.0.2
-hexathon~=0.1.6
+hexathon~=0.1.7
leveldir~=0.3.0
-#alembic==1.4.2
-#SQLAlchemy==1.3.20
confini~=0.6.0
-#pyxdg~=0.27
-chainlib~=0.1.3
+chainlib~=0.2.0
shep~=0.2.9
diff --git a/setup.cfg b/setup.cfg
@@ -1,6 +1,6 @@
[metadata]
name = chainqueue
-version = 0.1.16rc1
+version = 0.1.16
description = Generic blockchain transaction queue control
author = Louis Holbrook
author_email = dev@holbrook.no
diff --git a/tests/test_entry.py b/tests/test_entry.py
@@ -32,7 +32,7 @@ class TestEntry(TestShepBase):
entry = QueueEntry(self.store, cache_adapter=MockCacheTokenTx)
tx_hash_two = entry.create(signed_tx)
- txs = self.store.by_state()
+ txs = self.store.by_state(include_pending=True)
self.assertEqual(len(txs), 2)
logg.debug('tx hash one {}'.format(tx_hash_one))
@@ -40,14 +40,14 @@ class TestEntry(TestShepBase):
entry.load()
entry.sent()
- txs = self.store.by_state()
+ txs = self.store.by_state(include_pending=True)
self.assertEqual(len(txs), 1)
txs = self.store.by_state(state=self.store.IN_NETWORK)
self.assertEqual(len(txs), 1)
entry.succeed(None, None)
- txs = self.store.by_state()
+ txs = self.store.by_state(include_pending=True)
self.assertEqual(len(txs), 1)
entry = QueueEntry(self.store, tx_hash_two)
@@ -78,7 +78,7 @@ class TestEntry(TestShepBase):
entry = QueueEntry(self.store, tx_hash, cache_adapter=MockCacheTokenTx)
entry.load()
- self.assertEqual(str(entry), tx_hash + ': SENDFAIL')
+ self.assertEqual(str(entry.tx_hash), tx_hash)
if __name__ == '__main__':