1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-01-31 18:21:14 +00:00

Merge pull request #385 from setrofim/next

Tidy pt. 2
This commit is contained in:
marcbonnici 2017-04-28 10:28:04 +01:00 committed by GitHub
commit 4015e1e595
19 changed files with 1 additions and 40 deletions

View File

@ -1,4 +1,4 @@
from wa.framework import pluginloader, log, signal from wa.framework import pluginloader, signal
from wa.framework.command import Command, ComplexCommand, SubCommand from wa.framework.command import Command, ComplexCommand, SubCommand
from wa.framework.configuration import settings from wa.framework.configuration import settings
from wa.framework.configuration.core import Status from wa.framework.configuration.core import Status

View File

@ -1,39 +0,0 @@
from mock import Mock
from nose.tools import assert_true
from wa.framework import signal
from wa.framework.plugin import Plugin
from wa.utils.types import identifier
class SignalWatcher(object):
signals = []
def __init__(self):
for sig in self.signals:
name = identifier(sig.name)
callback = Mock()
callback.im_func.__name__ = name
setattr(self, name, callback)
signal.connect(getattr(self, name), sig)
def assert_all_called(self):
for m in self.__dict__.itervalues():
assert_true(m.called)
class MockContainerActor(Plugin):
name = 'mock-container'
kind = 'container-actor'
def __init__(self, owner=None, *args, **kwargs):
super(MockContainerActor, self).__init__(*args, **kwargs)
self.owner=owner
self.initialize = Mock()
self.finalize = Mock()
self.enter = Mock()
self.exit = Mock()
self.job_started = Mock()
self.job_completed = Mock()