Commit d484704b authored by BAIRE Anthony's avatar BAIRE Anthony
Browse files

missing decorators

parent 381bb3c1
......@@ -339,6 +339,7 @@ class Manager:
return (yield from run())
@asyncio.coroutine
def _process(self, key, reset):
"""Actual implementation of the job (to be reimplemented in inherited classes)
......@@ -1165,6 +1166,7 @@ class PullManager(Manager):
self.client = client
self.name = name
@asyncio.coroutine
def _process(self, img, reset):
image, version = img
log.info("pull to the %-10s %s:%s", self.name, image, version)
......@@ -1176,6 +1178,7 @@ class PushManager(Manager):
super().__init__(nb_threads, interruptible=True)
self.ctrl = ctrl
@asyncio.coroutine
def _process(self, version_id, reset):
ses = self.ctrl.session
......
......@@ -1764,7 +1764,9 @@ class ManagerTestCase(unittest.TestCase):
def test_manager_notimpl(self):
self.assertRaises(NotImplementedError, controller.Manager(1)._process, 1, None)
self.assertRaises(NotImplementedError,
asyncio.get_event_loop().run_until_complete,
controller.Manager(1)._process(1, None))
@mock.patch("controller.log.exception")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment