Add cache handling

This commit is contained in:
lash
2022-03-12 08:48:19 +00:00
parent b763d11eff
commit bd77706d1a
7 changed files with 174 additions and 28 deletions

View File

@@ -16,24 +16,20 @@ logging.basicConfig(level=logging.DEBUG)
logg = logging.getLogger()
class MockTranslator:
pass
class TestShep(TestShepBase):
class TestEntry(TestShepBase):
def test_entry_get(self):
tx_hash_one = add_0x(os.urandom(32).hex())
signed_tx = add_0x(os.urandom(128).hex())
nonce = 42
entry = QueueEntry(self.store, tx_hash_one)
entry.create(nonce, signed_tx)
entry.create(signed_tx)
tx_hash_two = add_0x(os.urandom(32).hex())
signed_tx = add_0x(os.urandom(128).hex())
nonce = 42
entry = QueueEntry(self.store, tx_hash_two)
entry.create(nonce, signed_tx)
entry.create(signed_tx)
txs = self.store.list()
self.assertEqual(len(txs), 2)