Reuse ModuleBuild.get_by_id

Signed-off-by: Chenxiong Qi <cqi@redhat.com>
This commit is contained in:
Chenxiong Qi
2019-06-30 11:05:57 +08:00
parent c15a7cadf3
commit 16bf4e945b
10 changed files with 132 additions and 123 deletions

View File

@@ -1650,7 +1650,7 @@ class TestBuild(BaseTestBuild):
# Simulate a random repo regen message that MBS didn't expect
cleanup_moksha()
module = db_session.query(models.ModuleBuild).get(module_build_id)
module = models.ModuleBuild.get_by_id(db_session, module_build_id)
msgs = [
module_build_service.messaging.KojiRepoChange(
msg_id="a faked internal message", repo_tag=module.koji_tag + "-build"