Merge pull request #43324 from twangboy/fix_unit.modules.test_chef

Fix `unit.modules.test_chef` for Windows
This commit is contained in:
Nicole Thomas 2017-09-05 12:40:10 -04:00 committed by GitHub
commit 62429c547d

View file

@ -36,7 +36,8 @@ class ChefTestCase(TestCase, LoaderModuleMockMixin):
'''
Test if it execute a chef client run and return a dict
'''
self.assertDictEqual(chef.client(), {})
with patch.dict(chef.__opts__, {'cachedir': r'c:\salt\var\cache\salt\minion'}):
self.assertDictEqual(chef.client(), {})
# 'solo' function tests: 1
@ -44,4 +45,5 @@ class ChefTestCase(TestCase, LoaderModuleMockMixin):
'''
Test if it execute a chef solo run and return a dict
'''
self.assertDictEqual(chef.solo('/dev/sda1'), {})
with patch.dict(chef.__opts__, {'cachedir': r'c:\salt\var\cache\salt\minion'}):
self.assertDictEqual(chef.solo('/dev/sda1'), {})