diff --git a/module_build_service/builder/KojiContentGenerator.py b/module_build_service/builder/KojiContentGenerator.py index 54e566c3..d9987ce6 100644 --- a/module_build_service/builder/KojiContentGenerator.py +++ b/module_build_service/builder/KojiContentGenerator.py @@ -326,7 +326,7 @@ class KojiContentGenerator(object): log_path = os.path.join(prepdir, "build.log") try: - source = build_logs.path(self.module.id) + source = build_logs.path(self.module) log.info("Moving logs from %r to %r" % (source, log_path)) shutil.copy(source, log_path) except IOError as e: diff --git a/tests/test_content_generator.py b/tests/test_content_generator.py index 85d08c09..fe5fa6a4 100644 --- a/tests/test_content_generator.py +++ b/tests/test_content_generator.py @@ -61,7 +61,7 @@ class TestBuild(unittest.TestCase): # Ensure that there is no build log from other tests try: - path = build_logs.path(self.cg.module.id) + path = build_logs.path(self.cg.module) os.remove(path) except OSError: pass @@ -75,7 +75,7 @@ class TestBuild(unittest.TestCase): import moksha.hub.reactor # noqa self.vcr.__exit__() try: - path = build_logs.path(self.cg.module.id) + path = build_logs.path(self.cg.module) os.remove(path) except OSError: pass diff --git a/tests/test_scheduler/test_module_wait.py b/tests/test_scheduler/test_module_wait.py index e9e79761..c4d55aa9 100644 --- a/tests/test_scheduler/test_module_wait.py +++ b/tests/test_scheduler/test_module_wait.py @@ -66,12 +66,14 @@ class TestModuleWait(unittest.TestCase): builder.module_build_tag = {'name': 'some-tag-build'} create_builder.return_value = builder mocked_module_build = mock.Mock() - mocked_module_build.extended_json.return_value = { + mocked_module_build.json.return_value = { 'name': 'foo', 'stream': 1, 'version': 1, 'state': 'some state', + 'id': 1 } + mocked_module_build.extended_json = mocked_module_build.json mmd = _modulemd.ModuleMetadata() formatted_testmodule_yml_path = os.path.join(