Add back the setup_loader_modules function

Use empty dict instead of defining wmi
This commit is contained in:
twangboy 2017-11-10 11:07:32 -07:00
parent 20273e3697
commit 6c872e95e6
No known key found for this signature in database
GPG Key ID: 93FF3BDEB278C9EB

View File

@ -7,6 +7,7 @@
from __future__ import absolute_import
# Import Salt Testing Libs
from tests.support.mixins import LoaderModuleMockMixin
from tests.support.unit import TestCase, skipIf
from tests.support.mock import (
MagicMock,
@ -63,13 +64,14 @@ class Mockwinapi(object):
@skipIf(NO_MOCK, NO_MOCK_REASON)
class WinNetworkTestCase(TestCase):
class WinNetworkTestCase(TestCase, LoaderModuleMockMixin):
'''
Test cases for salt.modules.win_network
'''
def setUp(self):
def setup_loader_modules(self):
self.WMI = Mock()
self.addCleanup(delattr, self, 'WMI')
return {win_network: {}}
# 'ping' function tests: 1