def _list(self):
return [self.fakeCloud]
+ def _set_stx_client(self):
+ pass
+
class FakeOcloudRepo(OcloudRepository):
def __init__(self):
publish: Callable):
return
- fakeuow = FakeUnitOfWork()
+ # fakeuow = FakeUnitOfWork()
handlers.EVENT_HANDLERS = {}
handlers.COMMAND_HANDLERS = {
commands.UpdateOCloud: update_ocloud,
}
- bus = bootstrap.bootstrap(False, fakeuow)
+ bus = bootstrap.bootstrap(False, uow)
return bus
def _targetname(self):
return "fakeocloudwatcher"
- def _probe(self, parent: object = None):
+ def _probe(self, parent: object = None, tags=None):
# import pdb; pdb.set_trace()
self.fakeOcloudWatcherCounter += 1
# hacking to stop the blocking sched task
count1 = fakewatcher.fakeOcloudWatcherCounter
testedworker.start()
- time.sleep(20)
+ time.sleep(1)
assert fakewatcher.fakeOcloudWatcherCounter > count1
# assumed hacking: probe has stopped the sched task
count3 = fakewatcher.fakeOcloudWatcherCounter
- time.sleep(3)
+ time.sleep(1)
assert fakewatcher.fakeOcloudWatcherCounter == count3