def test_test_module_command(mocker): mocker.patch.object(demisto, 'params', return_value=init_params()) mocker.patch('requests.sessions.Session.send', return_value=MockedResponse(200, "ok")) from Sixgill_Darkfeed import test_module_command test_module_command()
def test_test_module_command_raise_exception(mocker): mocker.patch.object(demisto, 'params', return_value=init_params()) mocker.patch('requests.sessions.Session.send', return_value=MockedResponse(400, "error")) from Sixgill_Darkfeed import test_module_command with pytest.raises(Exception): test_module_command()