mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-02-10 00:25:00 +08:00
Get the test suite working agian for https://pagure.io/fm-orchestrator/pull-request/73
This commit is contained in:
@@ -146,7 +146,7 @@ class ModuleBuild(RidaBase):
|
||||
session.add(module)
|
||||
session.commit()
|
||||
rida.messaging.publish(
|
||||
modname='rida',
|
||||
service='rida',
|
||||
topic='module.state.change',
|
||||
msg=module.json(), # Note the state is "init" here...
|
||||
conf=conf,
|
||||
@@ -165,7 +165,7 @@ class ModuleBuild(RidaBase):
|
||||
|
||||
log.debug("%r, state %r->%r" % (self, old_state, self.state))
|
||||
rida.messaging.publish(
|
||||
modname='rida',
|
||||
service='rida',
|
||||
topic='module.state.change',
|
||||
msg=self.json(), # Note the state is "init" here...
|
||||
conf=conf,
|
||||
|
||||
@@ -69,7 +69,7 @@ class TestUtilFunctions(unittest.TestCase):
|
||||
}
|
||||
mock_tail_messages.side_effect = \
|
||||
lambda: [('fedora-infrastructure', endpoint, topic, msg)]
|
||||
msg_obj = next(rida.messaging._fedmsg_listen())
|
||||
msg_obj = next(rida.messaging._fedmsg_listen(None))
|
||||
self.assertEquals(type(msg_obj), rida.messaging.KojiBuildChange)
|
||||
self.assertEquals(msg_obj.build_id, 2345678)
|
||||
self.assertEquals(msg_obj.build_new_state, 0)
|
||||
@@ -99,7 +99,7 @@ class TestUtilFunctions(unittest.TestCase):
|
||||
}
|
||||
mock_tail_messages.side_effect = \
|
||||
lambda: [('fedora-infrastructure', endpoint, topic, msg)]
|
||||
msg_obj = next(rida.messaging._fedmsg_listen())
|
||||
msg_obj = next(rida.messaging._fedmsg_listen(None))
|
||||
self.assertEquals(type(msg_obj), rida.messaging.KojiRepoChange)
|
||||
self.assertEquals(msg_obj.repo_tag, 'f23-build')
|
||||
self.assertEquals(msg_obj.msg_id,
|
||||
@@ -116,7 +116,7 @@ class TestUtilFunctions(unittest.TestCase):
|
||||
}
|
||||
mock_tail_messages.side_effect = \
|
||||
lambda: [('fedora-infrastructure', endpoint, topic, msg)]
|
||||
msg_obj = next(rida.messaging._fedmsg_listen())
|
||||
msg_obj = next(rida.messaging._fedmsg_listen(None))
|
||||
self.assertEquals(msg_obj.module_build_id, msg['msg']['id'])
|
||||
self.assertEquals(msg_obj.module_build_state, msg['msg']['state'])
|
||||
self.assertEquals(msg_obj.msg_id,
|
||||
|
||||
Reference in New Issue
Block a user