mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
parent
c65aefee20
commit
f74ca15f50
1 changed files with 0 additions and 20 deletions
|
@ -1318,26 +1318,6 @@ class FileTestCase(TestCase):
|
|||
(name, source,
|
||||
preserve=True), ret)
|
||||
|
||||
with patch.object(os.path, 'isdir', mock_t):
|
||||
with patch.dict(filestate.__opts__, {'test': False}):
|
||||
with patch.object(shutil, 'copy',
|
||||
MagicMock(side_effect=[IOError,
|
||||
True])):
|
||||
comt = ('Failed to copy "{0}" to "{1}"'
|
||||
.format(source, name))
|
||||
ret.update({'comment': comt, 'result': False})
|
||||
self.assertDictEqual(filestate.copy
|
||||
(name, source,
|
||||
preserve=True), ret)
|
||||
|
||||
comt = ('Copied "{0}" to "{1}"'.format(source,
|
||||
name))
|
||||
ret.update({'comment': comt, 'result': True,
|
||||
'changes': {name: source}})
|
||||
self.assertDictEqual(filestate.copy
|
||||
(name, source,
|
||||
preserve=True), ret)
|
||||
|
||||
# 'rename' function tests: 1
|
||||
|
||||
def test_rename(self):
|
||||
|
|
Loading…
Add table
Reference in a new issue