WIP crossroads on hex vs bytes interpretation

This commit is contained in:
lash
2022-03-12 14:12:02 +00:00
parent 0c9b42d086
commit e457275128
4 changed files with 68 additions and 49 deletions

View File

@@ -1,6 +1,7 @@
# standard imports
import tempfile
import unittest
import logging
# external imports
from shep.store.file import SimpleFileStoreFactory
@@ -15,8 +16,13 @@ from chainqueue import (
# test imports
from tests.common import (
MockCounter,
MockTokenCache
MockTokenCache,
MockCacheTokenTx,
)
from tests.base_shep import TestShepBase
logging.basicConfig(level=logging.DEBUG)
logg = logging.getLogger()
class MockContentStore:
@@ -33,7 +39,7 @@ class MockContentStore:
return self.store.get(k)
class TestShepBase(unittest.TestCase):
class TestIntegrateBase(TestShepBase):
def setUp(self):
self.path = tempfile.mkdtemp()
@@ -46,8 +52,8 @@ class TestShepBase(unittest.TestCase):
self.store = Store(chain_spec, self.state, content_store, counter, cache=self.cache)
def test_basic(self):
pass
def test_integration_valid(self):
self.store.put(b'foo'.hex(), b'bar'.hex(), cache_adapter=MockCacheTokenTx)
if __name__ == '__main__':