mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Patch salt.utils.which for test_netstat test
This commit is contained in:
parent
29b0acc3a2
commit
51f7e107dc
1 changed files with 3 additions and 2 deletions
|
@ -91,8 +91,9 @@ class NetworkTestCase(TestCase):
|
|||
Test for return information on open ports and states
|
||||
'''
|
||||
with patch.dict(network.__grains__, {'kernel': 'Linux'}):
|
||||
with patch.object(network, '_netstat_linux', return_value='A'):
|
||||
self.assertEqual(network.netstat(), 'A')
|
||||
with patch.object(salt.utils, 'which', return_value=True):
|
||||
with patch.object(network, '_netstat_linux', return_value='A'):
|
||||
self.assertEqual(network.netstat(), 'A')
|
||||
|
||||
with patch.dict(network.__grains__, {'kernel': 'OpenBSD'}):
|
||||
with patch.object(network, '_netstat_bsd', return_value='A'):
|
||||
|
|
Loading…
Add table
Reference in a new issue