Merge pull request #43786 from twangboy/win_fix_test_zypper

Fix `unit.modules.test_zypper` for Windows
This commit is contained in:
Mike Place 2017-09-28 10:51:58 +02:00 committed by GitHub
commit 10ddb8491c

View file

@ -189,7 +189,7 @@ class ZypperTestCase(TestCase, LoaderModuleMockMixin):
}
with patch.dict('salt.modules.zypper.__salt__', {'cmd.run_all': MagicMock(return_value=ref_out)}):
with self.assertRaisesRegex(CommandExecutionError,
"^Zypper command failure: Some handled zypper internal error\nAnother zypper internal error$"):
"^Zypper command failure: Some handled zypper internal error{0}Another zypper internal error$".format(os.linesep)):
zypper.list_upgrades(refresh=False)
# Test unhandled error