Fix KojiContentGenerator from a bug in PR 771

This commit is contained in:
mprahl
2017-11-09 14:29:22 -05:00
parent d1e80b8ad7
commit b0eada3e33
3 changed files with 6 additions and 4 deletions

View File

@@ -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:

View File

@@ -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

View File

@@ -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(