Fix integration.states.test_file on Windows

Fix hard-coded, unix-style line endings
This commit is contained in:
twangboy 2018-10-25 16:50:24 -06:00
parent f0cd8478d2
commit 4cb7062fd7
No known key found for this signature in database
GPG Key ID: 93FF3BDEB278C9EB

View File

@ -703,11 +703,12 @@ class FileTest(ModuleCase, SaltReturnAssertsMixin):
assert ret['result'], ret
with salt.utils.files.fopen(test_file) as fp_:
managed = salt.utils.stringutils.to_unicode(fp_.read())
expected = textwrap.dedent('''\
Die Webseite ist https://saltstack.com.
Der Zucker ist süß.
''')
expected = os.linesep.join([
'Die Webseite ist https://saltstack.com.',
'Der Zucker ist süß.',
'',
''
])
assert managed == expected, '{0!r} != {1!r}'.format(managed, expected) # pylint: disable=repr-flag-used-in-string
def test_managed_source_hash_indifferent_case(self):