def test_service_exists(self): """ Tests if it checks if a service is UP """ mock = MagicMock(return_value=MockNSService()) with patch.object(netscaler, "_service_get", mock): self.assertTrue(netscaler.service_exists("serviceGrpName"))
def test_service_exists(self): ''' Tests if it checks if a service is UP ''' mock = MagicMock(return_value=MockNSService()) with patch.object(netscaler, '_service_get', mock): self.assertTrue(netscaler.service_exists('serviceGrpName'))