mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Test fixes
This commit is contained in:
parent
e9674b541f
commit
4f441179aa
@ -313,7 +313,9 @@ class FileTestCase(TestCase):
|
||||
with patch.dict(filestate.__opts__, {'test': True}):
|
||||
comt = \
|
||||
'Directory {0} is set for removal'.format(name)
|
||||
ret.update({'comment': comt, 'result': None})
|
||||
ret.update({'comment': comt,
|
||||
'pchanges': {'removed': name},
|
||||
'result': None})
|
||||
self.assertDictEqual(filestate.absent(name), ret)
|
||||
|
||||
with patch.dict(filestate.__opts__, {'test': False}):
|
||||
@ -328,6 +330,8 @@ class FileTestCase(TestCase):
|
||||
ret.update({'comment': comt, 'result': False,
|
||||
'changes': {}})
|
||||
self.assertDictEqual(filestate.absent(name), ret)
|
||||
ret.update({'pchanges': {}})
|
||||
|
||||
|
||||
with patch.object(os.path, 'isdir', mock_f):
|
||||
with patch.dict(filestate.__opts__, {'test': True}):
|
||||
|
Loading…
Reference in New Issue
Block a user