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')
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")