Esempio n. 1
0
 def test_active_tcp(self):
     '''
     Test for return a dict containing information on all
      of the running TCP connections
     '''
     with patch.object(salt.utils.network, 'active_tcp', return_value='A'):
         self.assertEqual(network.active_tcp(), 'A')
Esempio n. 2
0
 def test_active_tcp(self):
     '''
     Test for return a dict containing information on all
      of the running TCP connections
     '''
     with patch.object(salt.utils.network, 'active_tcp', return_value='A'):
         self.assertEqual(network.active_tcp(), 'A')
Esempio n. 3
0
 def test_active_tcp(self):
     """
     Test for return a dict containing information on all
      of the running TCP connections
     """
     with patch.object(salt.utils.network, "active_tcp", return_value="A"):
         with patch.dict(network.__grains__, {"kernel": "Linux"}):
             self.assertEqual(network.active_tcp(), "A")