Make dispatcher definable in tests

This commit is contained in:
lash 2022-03-15 09:33:14 +00:00
parent 4db22bcc08
commit b77aafc7bc
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746
2 changed files with 1 additions and 1 deletions

View File

@ -50,6 +50,5 @@ class TestChaindFsBase(unittest.TestCase):
def setUp(self): def setUp(self):
self.chain_spec = ChainSpec('foo', 'bar', 42, 'baz') self.chain_spec = ChainSpec('foo', 'bar', 42, 'baz')
self.path = tempfile.mkdtemp() self.path = tempfile.mkdtemp()
self.dispatcher = MockDispatcher()
self.adapter = ChaindFsAdapter(self.chain_spec, self.path, self.cache_adapter, self.dispatcher) self.adapter = ChaindFsAdapter(self.chain_spec, self.path, self.cache_adapter, self.dispatcher)

View File

@ -28,6 +28,7 @@ class TestChaindFs(TestChaindFsBase):
def setUp(self): def setUp(self):
self.cache_adapter = MockCacheAdapter self.cache_adapter = MockCacheAdapter
self.dispatcher = MockDispatcher()
super(TestChaindFs, self).setUp() super(TestChaindFs, self).setUp()