mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Windows compatible cp test
This commit is contained in:
parent
04125b077d
commit
6e7824266b
1 changed files with 3 additions and 0 deletions
|
@ -21,6 +21,7 @@ from tests.support.mock import (
|
|||
# Import Salt Libs
|
||||
import salt.utils.files
|
||||
import salt.utils.templates as templates
|
||||
import salt.utils.platform
|
||||
import salt.transport
|
||||
import salt.modules.cp as cp
|
||||
from salt.exceptions import CommandExecutionError
|
||||
|
@ -132,6 +133,8 @@ class CpTestCase(TestCase, LoaderModuleMockMixin):
|
|||
Test if push works with good posix path.
|
||||
'''
|
||||
filename = '/saltines/test.file'
|
||||
if salt.utils.platform.is_windows():
|
||||
filename = 'c:\\saltines\\test.file'
|
||||
with patch('salt.modules.cp.os.path',
|
||||
MagicMock(isfile=Mock(return_value=True), wraps=cp.os.path)), \
|
||||
patch.multiple('salt.modules.cp',
|
||||
|
|
Loading…
Add table
Reference in a new issue