Fix unit.modules.test_zypper for Windows

Use `os.linesep` for newline in expected return
This commit is contained in:
twangboy 2017-09-27 16:59:36 -06:00
parent 1254da1df5
commit aafec7ab0e
No known key found for this signature in database
GPG key ID: 93FF3BDEB278C9EB

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