Merge pull request #13 from terminalmage/merge-2017.7

Fix default opts handling
This commit is contained in:
Mike Place 2017-06-22 13:54:32 -05:00 committed by GitHub
commit b2f7dbd2f0

View File

@ -22,15 +22,6 @@ from tests.support.mock import (
import salt.utils
import salt.modules.state as state
from salt.exceptions import SaltInvocationError
from salt.modules import state
# Globals
state.__salt__ = {}
state.__context__ = {}
state.__opts__ = {'cachedir': '/D',
'environment': None,
'__cli': 'salt'}
state.__pillar__ = {}
class MockState(object):
@ -354,7 +345,15 @@ class StateTestCase(TestCase, LoaderModuleMockMixin):
patcher = patch('salt.modules.state.salt.state', MockState())
patcher.start()
self.addCleanup(patcher.stop)
return {state: {'__opts__': {'cachedir': '/D'}}}
return {
state: {
'__opts__': {
'cachedir': '/D',
'environment': None,
'__cli': 'salt',
},
},
}
def test_running(self):
'''