diff --git a/repos/system_upgrade/common/actors/scansourcefiles/tests/unit_test_scansourcefiles.py b/repos/system_upgrade/common/actors/scansourcefiles/tests/unit_test_scansourcefiles.py index 9dc026bff0..2416bc6537 100644 --- a/repos/system_upgrade/common/actors/scansourcefiles/tests/unit_test_scansourcefiles.py +++ b/repos/system_upgrade/common/actors/scansourcefiles/tests/unit_test_scansourcefiles.py @@ -48,6 +48,11 @@ def mocked_run(cmd, *args, **kwargs): monkeypatch.setattr(api, 'current_logger', testutils.logger_mocked()) assert scansourcefiles._get_rpm_name(input_file) == run_output['stdout'][0] + if len(run_output['stdout']) > 1: + expected_warnmsg = ('The {} file is owned by multiple rpms: {}.' + .format(input_file, ', '.join(run_output['stdout']))) + assert api.current_logger.warnmsg == [expected_warnmsg] + def test_get_rpm_name_error(monkeypatch): input_file = '/file'