Skip to content

Commit

Permalink
Merge pull request saltstack#49167 from dwoz/filefix
Browse files Browse the repository at this point in the history
Fix remaining file state integration tests (py3)
  • Loading branch information
gtmanfred authored and dwoz committed Aug 17, 2018
1 parent 8bda1e5 commit a18d937
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions salt/states/file.py
Expand Up @@ -2987,7 +2987,7 @@ def directory(name,
perms: full_control
- win_inheritance: False
'''
name = os.path.expanduser(name)
name = os.path.normcase(os.path.expanduser(name))
ret = {'name': name,
'changes': {},
'pchanges': {},
Expand Down Expand Up @@ -3515,7 +3515,7 @@ def recurse(name,
# "env" is not supported; Use "saltenv".
kwargs.pop('env')

name = os.path.expanduser(sdecode(name))
name = os.path.normcase(os.path.expanduser(sdecode(name)))

user = _test_owner(kwargs, user=user)
if salt.utils.platform.is_windows():
Expand Down
8 changes: 4 additions & 4 deletions tests/integration/states/test_file.py
Expand Up @@ -267,7 +267,7 @@ def test_managed_file_mode(self):

if IS_WINDOWS:
expected = 'The \'mode\' option is not supported on Windows'
self.assertEqual(ret[ret.keys()[0]]['comment'], expected)
self.assertEqual(ret[list(ret)[0]]['comment'], expected)
self.assertSaltFalseReturn(ret)
return

Expand Down Expand Up @@ -303,7 +303,7 @@ def test_managed_file_mode_file_exists_replace(self):

if IS_WINDOWS:
expected = 'The \'mode\' option is not supported on Windows'
self.assertEqual(ret[ret.keys()[0]]['comment'], expected)
self.assertEqual(ret[list(ret)[0]]['comment'], expected)
self.assertSaltFalseReturn(ret)
return

Expand Down Expand Up @@ -335,7 +335,7 @@ def test_managed_file_mode_file_exists_noreplace(self):

if IS_WINDOWS:
expected = 'The \'mode\' option is not supported on Windows'
self.assertEqual(ret[ret.keys()[0]]['comment'], expected)
self.assertEqual(ret[list(ret)[0]]['comment'], expected)
self.assertSaltFalseReturn(ret)
return

Expand Down Expand Up @@ -418,7 +418,7 @@ def test_managed_dir_mode(self):
)
if IS_WINDOWS:
expected = 'The \'mode\' option is not supported on Windows'
self.assertEqual(ret[ret.keys()[0]]['comment'], expected)
self.assertEqual(ret[list(ret)[0]]['comment'], expected)
self.assertSaltFalseReturn(ret)
return

Expand Down

0 comments on commit a18d937

Please sign in to comment.