mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
used @patch for mocking.
This commit is contained in:
parent
e86334f90e
commit
63a1a58e32
@ -82,12 +82,11 @@ class Mockloader(object):
|
|||||||
self.lst = lst
|
self.lst = lst
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
sysmod.salt.state = Mockstate
|
|
||||||
sysmod.salt.runner = Mockrunner
|
|
||||||
sysmod.salt.loader = Mockloader()
|
|
||||||
|
|
||||||
|
|
||||||
@skipIf(NO_MOCK, NO_MOCK_REASON)
|
@skipIf(NO_MOCK, NO_MOCK_REASON)
|
||||||
|
@patch('salt.state', Mockstate())
|
||||||
|
@patch('salt.runner', Mockrunner())
|
||||||
|
@patch('salt.loader', Mockloader())
|
||||||
class SysmodTestCase(TestCase):
|
class SysmodTestCase(TestCase):
|
||||||
'''
|
'''
|
||||||
Test cases for salt.modules.sysmod
|
Test cases for salt.modules.sysmod
|
||||||
|
Loading…
Reference in New Issue
Block a user