mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Merge pull request #13 from terminalmage/merge-2017.7
Fix default opts handling
This commit is contained in:
commit
b2f7dbd2f0
@ -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):
|
||||
'''
|
||||
|
Loading…
Reference in New Issue
Block a user