@@ -721,6 +721,29 @@ def test_search_events_all_params(self):
721
721
self .assertIsInstance (event_response .products , Products )
722
722
self .assertIsInstance (event_response .products .raw_device_attributes .data , RawDeviceAttributes )
723
723
724
+ def test_search_events_partial_params (self ):
725
+ """Test that search events returns 200 with partial params provided"""
726
+ LIMIT = 100
727
+ BOT = 'good'
728
+ LINKED_ID = 'some_linked_id'
729
+ START = 1582299576511
730
+ REVERSE = True
731
+ mock_pool = MockPoolManager (self )
732
+ self .api .api_client .rest_client .pool_manager = mock_pool
733
+ mock_pool .expect_request ('GET' , TestFingerprintApi .get_search_events_path (),
734
+ fields = [self .integration_info , ('limit' , LIMIT ),
735
+ ('visitor_id' , MOCK_SEARCH_EVENTS_200 ), ('bot' , BOT ),
736
+ ('linked_id' , LINKED_ID ), ('start' , START ), ('reverse' , REVERSE )],
737
+ headers = self .request_headers , preload_content = True , timeout = None )
738
+
739
+ response = self .api .search_events (LIMIT , visitor_id = MOCK_SEARCH_EVENTS_200 , bot = BOT , linked_id = LINKED_ID ,
740
+ start = START , reverse = REVERSE )
741
+ self .assertIsInstance (response , SearchEventsResponse )
742
+ event_response = response .events [0 ]
743
+ self .assertIsInstance (event_response , SearchEventsResponseEvents )
744
+ self .assertIsInstance (event_response .products , Products )
745
+ self .assertIsInstance (event_response .products .raw_device_attributes .data , RawDeviceAttributes )
746
+
724
747
def test_search_events_400 (self ):
725
748
"""Test that search events returns 400 invalid ip address"""
726
749
mock_pool = MockPoolManager (self )
0 commit comments