mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #40685 from Ch3LL/fix_mac_file
Fix errno code for filecache test for other operating systems.
This commit is contained in:
commit
77028a6c4e
1 changed files with 3 additions and 3 deletions
|
@ -5,13 +5,13 @@
|
|||
|
||||
# Import Python libs
|
||||
from __future__ import absolute_import
|
||||
import errno
|
||||
from mock import Mock
|
||||
|
||||
# Import Salt Testing libs
|
||||
from salttesting import TestCase
|
||||
from salttesting.helpers import ensure_in_syspath
|
||||
from salttesting.mock import patch
|
||||
from mock import Mock
|
||||
import errno
|
||||
from salt.ext.six.moves import range
|
||||
|
||||
ensure_in_syspath('../')
|
||||
|
@ -48,7 +48,7 @@ class FileclientTestCase(TestCase):
|
|||
If makedirs raises other than EEXIST errno, an exception should be raised.
|
||||
'''
|
||||
with patch('os.path.isfile', lambda prm: False):
|
||||
with patch('os.makedirs', self._fake_makedir(num=errno.EREMOTEIO)):
|
||||
with patch('os.makedirs', self._fake_makedir(num=errno.EROFS)):
|
||||
with self.assertRaises(OSError):
|
||||
with Client(self.opts)._cache_loc('testfile') as c_ref_itr:
|
||||
assert c_ref_itr == '/__test__/files/base/testfile'
|
||||
|
|
Loading…
Add table
Reference in a new issue