chainsyncer/tests/store/test_1_fs.py

33 lines
643 B
Python
Raw Normal View History

2022-03-17 15:54:34 +01:00
# standard imports
import unittest
import logging
# local imports
from chainsyncer.store.fs import SyncFsStore
from chainsyncer.unittest.store import TestStoreBase
2022-03-17 15:54:34 +01:00
logging.basicConfig(level=logging.DEBUG)
logg = logging.getLogger()
class StoreFactory:
2022-03-17 15:54:34 +01:00
def __init__(self, path):
self.path = path
2022-03-17 23:07:19 +01:00
def create(self, session_id=None):
return SyncFsStore(self.path, session_id=session_id)
2022-03-17 23:07:19 +01:00
class TestFs(TestStoreBase):
2022-03-17 23:07:19 +01:00
def setUp(self):
super(TestFs, self).setUp()
self.store_factory = StoreFactory(self.path).create
2022-03-19 02:13:37 +01:00
2022-03-17 15:54:34 +01:00
if __name__ == '__main__':
TestStoreBase.link(TestFs)
2022-03-17 15:54:34 +01:00
unittest.main()