test_1_fs.py (643B)
1 # standard imports 2 import unittest 3 import logging 4 5 # local imports 6 from chainsyncer.store.fs import SyncFsStore 7 from chainsyncer.unittest.store import TestStoreBase 8 9 logging.basicConfig(level=logging.DEBUG) 10 logg = logging.getLogger() 11 12 13 class StoreFactory: 14 15 def __init__(self, path): 16 self.path = path 17 18 19 def create(self, session_id=None): 20 return SyncFsStore(self.path, session_id=session_id) 21 22 23 class TestFs(TestStoreBase): 24 25 def setUp(self): 26 super(TestFs, self).setUp() 27 self.store_factory = StoreFactory(self.path).create 28 29 30 if __name__ == '__main__': 31 TestStoreBase.link(TestFs) 32 unittest.main()