def test_filter_with_like_name_and_name_field(self): from QRadar_v2 import get_custom_properties_command with pytest.raises(DemistoException, match=self.error): get_custom_properties_command(self.client, filter='name="hatul"', field_name='a,g', like_name='b,c')
def test_like_name_only(self, requests_mock): from QRadar_v2 import get_custom_properties_command requests_mock.get( 'https://example.com/api/config/event_sources/custom_properties/regex_properties?filter=name+ILIKE+%22%25trol%25%22', json=[{'name': 'bloop'}] ) resp = get_custom_properties_command(self.client, like_name='trol') assert resp['EntryContext']['QRadar.Properties'][0]['name'] == 'bloop'