Prepare integration test
This commit is contained in:
@@ -4,6 +4,7 @@ import unittest
|
||||
|
||||
# external imports
|
||||
from shep.store.file import SimpleFileStoreFactory
|
||||
from chainlib.chain import ChainSpec
|
||||
|
||||
# local imports
|
||||
from chainqueue import (
|
||||
@@ -11,6 +12,10 @@ from chainqueue import (
|
||||
Status,
|
||||
)
|
||||
|
||||
# test imports
|
||||
from tests.common import MockCounter
|
||||
|
||||
|
||||
|
||||
class MockContentStore:
|
||||
|
||||
@@ -26,18 +31,6 @@ class MockContentStore:
|
||||
return self.store.get(k)
|
||||
|
||||
|
||||
class MockCounter:
|
||||
|
||||
def __init__(self):
|
||||
self.c = 0
|
||||
|
||||
|
||||
def next(self):
|
||||
c = self.c
|
||||
self.c += 1
|
||||
return c
|
||||
|
||||
|
||||
class TestShepBase(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
@@ -46,4 +39,5 @@ class TestShepBase(unittest.TestCase):
|
||||
self.state = Status(factory)
|
||||
content_store = MockContentStore()
|
||||
counter = MockCounter()
|
||||
self.store = Store(self.state, content_store, counter)
|
||||
chain_spec = ChainSpec('foo', 'bar', 42, 'baz')
|
||||
self.store = Store(chain_spec, self.state, content_store, counter)
|
||||
|
||||
Reference in New Issue
Block a user