Merge "trivial: Fix error message format"

This commit is contained in:
Zuul 2018-06-06 14:05:09 +00:00 committed by Gerrit Code Review
commit 062d9883d7
2 changed files with 2 additions and 2 deletions

View File

@ -353,7 +353,7 @@ class SecretsSubstitution(object):
else:
message = ('Could not find substitution source document '
'[%s] %s among the provided substitution '
'sources.', src_schema, src_name)
'sources.' % (src_schema, src_name))
if self._fail_on_missing_sub_src:
LOG.error(message)
raise errors.SubstitutionSourceNotFound(

View File

@ -134,7 +134,7 @@ class TestDocumentLayeringScenarios(TestDocumentLayering):
self._test_layering(documents, site_expected={},
fail_on_missing_sub_src=False)
self.assertTrue(m_log.warning.called)
self.assertRegex(m_log.warning.mock_calls[0][1][0][0],
self.assertRegex(m_log.warning.mock_calls[0][1][0],
r'Could not find substitution source document .*')
def test_layering_substitution_source_skips_layering(self):