Skip to content

Commit b95e3f7

Browse files
committed
test: extend search_events_all_params test to include all filters
Expanded the `test_search_events_all_params` test to cover all supported query parameters (filters). This improves test coverage.
1 parent 8902f48 commit b95e3f7

File tree

1 file changed

+29
-2
lines changed

1 file changed

+29
-2
lines changed

test/test_fingerprint_api.py

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -704,17 +704,44 @@ def test_search_events_all_params(self):
704704
END = 1582299576513
705705
REVERSE = True
706706
SUSPECT = False
707+
ANTI_DETECT_BROWSER = True
708+
CLONED_APP = True
709+
FACTORY_RESET = True
710+
FRIDA = True
711+
JAILBROKEN = True
712+
MIN_SUSPECT_SCORE = .5
713+
PRIVACY_SETTINGS = True
714+
ROOT_APPS = True
715+
TAMPERING = True
716+
VIRTUAL_MACHINE = True
717+
VPN = True
718+
VPN_CONFIDENCE = 'medium'
719+
EMULATOR = True
720+
INCOGNITO = True
721+
707722
mock_pool = MockPoolManager(self)
708723
self.api.api_client.rest_client.pool_manager = mock_pool
709724
mock_pool.expect_request('GET', TestFingerprintApi.get_search_events_path(),
710725
fields=[self.integration_info, ('limit', LIMIT),
711726
('visitor_id', MOCK_SEARCH_EVENTS_200), ('bot', BOT),
712727
('ip_address', IP_ADDRESS), ('linked_id', LINKED_ID), ('start', START),
713-
('end', END), ('reverse', REVERSE), ('suspect', SUSPECT)],
728+
('end', END), ('reverse', REVERSE), ('suspect', SUSPECT), ('vpn', VPN),
729+
('virtual_machine', VIRTUAL_MACHINE), ('tampering', TAMPERING),
730+
('anti_detect_browser', ANTI_DETECT_BROWSER), ('incognito', INCOGNITO),
731+
('privacy_settings', PRIVACY_SETTINGS), ('jailbroken', JAILBROKEN),
732+
('frida', FRIDA), ('factory_reset', FACTORY_RESET), ('cloned_app', CLONED_APP),
733+
('emulator', EMULATOR), ('root_apps', ROOT_APPS),
734+
('vpn_confidence', VPN_CONFIDENCE), ('min_suspect_score', MIN_SUSPECT_SCORE)],
714735
headers=self.request_headers, preload_content=True, timeout=None)
715736

716737
response = self.api.search_events(LIMIT, visitor_id=MOCK_SEARCH_EVENTS_200, bot=BOT, ip_address=IP_ADDRESS,
717-
linked_id=LINKED_ID, start=START, end=END, reverse=REVERSE, suspect=SUSPECT)
738+
linked_id=LINKED_ID, start=START, end=END, reverse=REVERSE, suspect=SUSPECT,
739+
anti_detect_browser=ANTI_DETECT_BROWSER, cloned_app=CLONED_APP,
740+
factory_reset=FACTORY_RESET, frida=FRIDA, jailbroken=JAILBROKEN,
741+
min_suspect_score=MIN_SUSPECT_SCORE, privacy_settings=PRIVACY_SETTINGS,
742+
root_apps=ROOT_APPS, tampering=TAMPERING, virtual_machine=VIRTUAL_MACHINE,
743+
vpn=VPN, vpn_confidence=VPN_CONFIDENCE, emulator=EMULATOR,
744+
incognito=INCOGNITO)
718745
self.assertIsInstance(response, SearchEventsResponse)
719746
event_response = response.events[0]
720747
self.assertIsInstance(event_response, SearchEventsResponseEvents)

0 commit comments

Comments
 (0)