Rehabilitate tests after by state signature change

This commit is contained in:
lash 2022-05-09 19:40:41 +00:00
parent 2a9bf41cf5
commit 97fbec6477
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746
4 changed files with 8 additions and 12 deletions

View File

@ -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):

View File

@ -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

View File

@ -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

View File

@ -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__':