@@ -601,6 +601,30 @@ def test_get_facts_alert_settings_api_module(self, powerscale_module_mock, input
601
601
assert MockGatherfactsApi .get_gather_facts_module_response (
602
602
gather_subset ) == powerscale_module_mock .module .exit_json .call_args [1 ][return_key ]
603
603
604
+ @pytest .mark .parametrize ("input_params" , [
605
+ {"gather_subset" : "alert_settings" , "return_key" : "alert_settings" }
606
+ ]
607
+ )
608
+ def test_get_facts_alert_settings_api_911_module (self , powerscale_module_mock , input_params ):
609
+ """Test the get_facts that uses the alert settings api endpoint to get the module response"""
610
+
611
+ gather_subset = input_params .get ('gather_subset' )
612
+ return_key = input_params .get ('return_key' )
613
+ api_response = MockGatherfactsApi .get_gather_facts_api_response (
614
+ gather_subset )
615
+ self .get_module_args .update ({
616
+ 'gather_subset' : ['alert_settings' ]
617
+ })
618
+ powerscale_module_mock .major = 9
619
+ powerscale_module_mock .minor = 11
620
+ powerscale_module_mock .module .params = self .get_module_args
621
+ with patch .object (powerscale_module_mock .event_api ,
622
+ MockGatherfactsApi .get_gather_facts_error_method (gather_subset )) as mock_method :
623
+ mock_method .return_value = MockSDKResponse (api_response )
624
+ powerscale_module_mock .perform_module_operation ()
625
+ assert MockGatherfactsApi .get_gather_facts_module_response (
626
+ gather_subset ) == powerscale_module_mock .module .exit_json .call_args [1 ][return_key ]
627
+
604
628
@pytest .mark .parametrize ("gather_subset" , ["alert_settings" ])
605
629
def test_get_facts_alert_settings_api_exception (self , powerscale_module_mock , gather_subset ):
606
630
"""Test the get_facts that uses the alert settings api endpoint to get the exception"""
0 commit comments