insightconnect-plugin-runtime 5.5.5__tar.gz → 5.6.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {insightconnect_plugin_runtime-5.5.5/insightconnect_plugin_runtime.egg-info → insightconnect_plugin_runtime-5.6.1}/PKG-INFO +3 -1
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/README.md +2 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime/api/endpoints.py +5 -3
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime/exceptions.py +6 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime/helper.py +2 -1
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime/plugin.py +1 -1
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1/insightconnect_plugin_runtime.egg-info}/PKG-INFO +3 -1
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/setup.py +1 -1
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/unit/test_exceptions.py +18 -1
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/unit/test_helpers.py +7 -1
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/MANIFEST.in +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect-plugin-swagger.json +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime/__init__.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime/action.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime/api/__init__.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime/api/schemas.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime/cli.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime/clients/__init__.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime/clients/aws_client.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime/clients/oauth.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime/connection.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime/data/input_message_schema.json +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime/data/output_message_schema.json +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime/dispatcher.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime/metrics.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime/schema.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime/server.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime/step.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime/task.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime/trigger.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime/util.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime/variables.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime.egg-info/SOURCES.txt +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime.egg-info/dependency_links.txt +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime.egg-info/requires.txt +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime.egg-info/top_level.txt +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/setup.cfg +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/__init__.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/__init__.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/__init__.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/__init__.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/__init__.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/actions/__init__.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/actions/hello/__init__.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/actions/hello/action.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/actions/hello/schema.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/actions/return_bad_json/__init__.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/actions/return_bad_json/action.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/actions/return_bad_json/schema.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/actions/throw_exception/__init__.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/actions/throw_exception/action.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/actions/throw_exception/schema.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/connection/__init__.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/connection/connection.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/connection/schema.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/tasks/__init__.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/tasks/monitor_events/__init__.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/tasks/monitor_events/schema.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/tasks/monitor_events/task.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/triggers/__init__.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/triggers/hello_trigger/__init__.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/triggers/hello_trigger/schema.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/triggers/hello_trigger/trigger.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/triggers/return_bad_json_trigger/__init__.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/triggers/return_bad_json_trigger/schema.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/triggers/return_bad_json_trigger/trigger.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/triggers/throw_exception_trigger/__init__.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/triggers/throw_exception_trigger/schema.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/triggers/throw_exception_trigger/trigger.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/util/__init__.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/setup.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/tests/__init__.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/tests/conftest.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/tests/test_cli.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/tests/test_hello_world.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/tests/test_server.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/unit/__init__.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/unit/test_action.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/unit/test_api.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/unit/test_aws_action.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/unit/test_custom_encoder.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/unit/test_endpoints.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/unit/test_metrics.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/unit/test_oauth.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/unit/test_plugin.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/unit/test_schema.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/unit/test_server_cloud_plugins.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/unit/test_server_spec.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/unit/test_trigger.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/unit/test_variables.py +0 -0
- {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/unit/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: insightconnect-plugin-runtime
|
|
3
|
-
Version: 5.
|
|
3
|
+
Version: 5.6.1
|
|
4
4
|
Summary: InsightConnect Plugin Runtime
|
|
5
5
|
Home-page: https://github.com/rapid7/komand-plugin-sdk-python
|
|
6
6
|
Author: Rapid7 Integrations Alliance
|
|
@@ -211,6 +211,8 @@ contributed. Black is installed as a test dependency and the hook can be initial
|
|
|
211
211
|
after cloning this repository.
|
|
212
212
|
|
|
213
213
|
## Changelog
|
|
214
|
+
* 5.6.1 - Making sure all paths that can call the task connection test endpoints return a 400 error if the test fails
|
|
215
|
+
* 5.6.0 - Add APIException class for error handling | Fix error in response_handler where data of type Response was not correctly being returned
|
|
214
216
|
* 5.5.5 - Address bug with typing for type `Dict` in Python 3.8
|
|
215
217
|
* 5.5.4 - Support pagination parameters within AWS client.
|
|
216
218
|
* 5.5.3 - Adding in a new endpoint that can be called to run a task connection test
|
|
@@ -182,6 +182,8 @@ contributed. Black is installed as a test dependency and the hook can be initial
|
|
|
182
182
|
after cloning this repository.
|
|
183
183
|
|
|
184
184
|
## Changelog
|
|
185
|
+
* 5.6.1 - Making sure all paths that can call the task connection test endpoints return a 400 error if the test fails
|
|
186
|
+
* 5.6.0 - Add APIException class for error handling | Fix error in response_handler where data of type Response was not correctly being returned
|
|
185
187
|
* 5.5.5 - Address bug with typing for type `Dict` in Python 3.8
|
|
186
188
|
* 5.5.4 - Support pagination parameters within AWS client.
|
|
187
189
|
* 5.5.3 - Adding in a new endpoint that can be called to run a task connection test
|
|
@@ -283,7 +283,7 @@ class Endpoints:
|
|
|
283
283
|
self.logger.debug("Request input: %s", input_message)
|
|
284
284
|
Endpoints.validate_action_trigger_task_empty_input(input_message)
|
|
285
285
|
Endpoints.validate_action_trigger_task_name(input_message, name, "task")
|
|
286
|
-
output = self.run_action_trigger_task(input_message, True)
|
|
286
|
+
output = self.run_action_trigger_task(input_message, True, connection_test_type="test_task")
|
|
287
287
|
return output
|
|
288
288
|
|
|
289
289
|
@v1.route("/api")
|
|
@@ -821,13 +821,13 @@ class Endpoints:
|
|
|
821
821
|
|
|
822
822
|
return input_data
|
|
823
823
|
|
|
824
|
-
def run_action_trigger_task(self, input_message, test=False):
|
|
824
|
+
def run_action_trigger_task(self, input_message, test=False, connection_test_type="test"):
|
|
825
825
|
connection = input_message.get("body", {}).get("connection", {})
|
|
826
826
|
status_code = 200
|
|
827
827
|
output = None
|
|
828
828
|
try:
|
|
829
829
|
output = self.plugin.handle_step(
|
|
830
|
-
input_message, is_debug=self.debug, is_test=test
|
|
830
|
+
input_message, is_debug=self.debug, is_test=test, connection_test_type=connection_test_type
|
|
831
831
|
)
|
|
832
832
|
except LoggedException as error:
|
|
833
833
|
wrapped_exception = error.ex
|
|
@@ -841,6 +841,8 @@ class Endpoints:
|
|
|
841
841
|
and wrapped_exception.preset is PluginException.Preset.BAD_REQUEST
|
|
842
842
|
):
|
|
843
843
|
status_code = 400
|
|
844
|
+
elif isinstance(wrapped_exception, (ConnectionTestException, ClientException)):
|
|
845
|
+
status_code = 400
|
|
844
846
|
elif isinstance(wrapped_exception, ServerException):
|
|
845
847
|
# I'm unsure about this
|
|
846
848
|
status_code = 500
|
|
@@ -207,3 +207,9 @@ class PluginException(ConnectionTestException):
|
|
|
207
207
|
return "An error occurred during plugin execution!\n\n{cause} {assistance}".format(
|
|
208
208
|
cause=self.cause, assistance=self.assistance
|
|
209
209
|
)
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
class APIException(PluginException):
|
|
213
|
+
def __init__(self, cause=None, assistance=None, data=None, preset=None, status_code=None):
|
|
214
|
+
super().__init__(cause, assistance, data, preset)
|
|
215
|
+
self.status_code = status_code
|
|
@@ -243,7 +243,8 @@ def response_handler(
|
|
|
243
243
|
if hasattr(exception, "data") and data is not None:
|
|
244
244
|
exception.data = data
|
|
245
245
|
elif status_code_preset:
|
|
246
|
-
exception = PluginException(preset=status_code_preset
|
|
246
|
+
exception = PluginException(preset=status_code_preset)
|
|
247
|
+
exception.data = data
|
|
247
248
|
|
|
248
249
|
raise exception
|
|
249
250
|
|
|
@@ -627,7 +627,7 @@ class Plugin(object):
|
|
|
627
627
|
# Check if connection test func available. If so - use it (preferred). Else fallback to action/trigger test
|
|
628
628
|
if hasattr(step.connection, "test"):
|
|
629
629
|
if hasattr(step.connection, "test") and connection_test_type == "test_task":
|
|
630
|
-
func = step.connection.
|
|
630
|
+
func = step.connection.test_task
|
|
631
631
|
else:
|
|
632
632
|
func = step.connection.test
|
|
633
633
|
else:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: insightconnect-plugin-runtime
|
|
3
|
-
Version: 5.
|
|
3
|
+
Version: 5.6.1
|
|
4
4
|
Summary: InsightConnect Plugin Runtime
|
|
5
5
|
Home-page: https://github.com/rapid7/komand-plugin-sdk-python
|
|
6
6
|
Author: Rapid7 Integrations Alliance
|
|
@@ -211,6 +211,8 @@ contributed. Black is installed as a test dependency and the hook can be initial
|
|
|
211
211
|
after cloning this repository.
|
|
212
212
|
|
|
213
213
|
## Changelog
|
|
214
|
+
* 5.6.1 - Making sure all paths that can call the task connection test endpoints return a 400 error if the test fails
|
|
215
|
+
* 5.6.0 - Add APIException class for error handling | Fix error in response_handler where data of type Response was not correctly being returned
|
|
214
216
|
* 5.5.5 - Address bug with typing for type `Dict` in Python 3.8
|
|
215
217
|
* 5.5.4 - Support pagination parameters within AWS client.
|
|
216
218
|
* 5.5.3 - Adding in a new endpoint that can be called to run a task connection test
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from insightconnect_plugin_runtime.exceptions import PluginException
|
|
1
|
+
from insightconnect_plugin_runtime.exceptions import PluginException, APIException
|
|
2
2
|
from unittest import TestCase
|
|
3
3
|
|
|
4
4
|
|
|
@@ -85,3 +85,20 @@ class TestExceptions(TestCase):
|
|
|
85
85
|
raise (PluginException(preset=test_data.get("preset")))
|
|
86
86
|
assert context.exception.cause == test_data.get("expected_cause")
|
|
87
87
|
assert context.exception.assistance == test_data.get("expected_assistance")
|
|
88
|
+
|
|
89
|
+
def test_api_exception(self):
|
|
90
|
+
with self.assertRaises(APIException) as context:
|
|
91
|
+
raise (
|
|
92
|
+
APIException(
|
|
93
|
+
preset=PluginException.Preset.NOT_FOUND,
|
|
94
|
+
status_code=404,
|
|
95
|
+
data="example",
|
|
96
|
+
)
|
|
97
|
+
)
|
|
98
|
+
assert context.exception.cause == "Invalid or unreachable endpoint provided."
|
|
99
|
+
assert (
|
|
100
|
+
context.exception.assistance
|
|
101
|
+
== "Verify the URLs or endpoints in your configuration are correct."
|
|
102
|
+
)
|
|
103
|
+
assert context.exception.data == "example"
|
|
104
|
+
assert context.exception.status_code == 404
|
|
@@ -439,7 +439,11 @@ class TestRequestsHelpers(TestCase):
|
|
|
439
439
|
):
|
|
440
440
|
request = requests.Request(method=method, url=url, json=None)
|
|
441
441
|
with self.assertRaises(PluginException) as error:
|
|
442
|
-
helper.make_request(
|
|
442
|
+
helper.make_request(
|
|
443
|
+
_request=request,
|
|
444
|
+
exception_custom_configs=exp_config,
|
|
445
|
+
exception_data_location=ResponseExceptionData.RESPONSE,
|
|
446
|
+
)
|
|
443
447
|
assert (isinstance(error, exception_type), True)
|
|
444
448
|
if test_name == "custom404":
|
|
445
449
|
self.assertEqual(
|
|
@@ -450,6 +454,8 @@ class TestRequestsHelpers(TestCase):
|
|
|
450
454
|
error.exception.assistance,
|
|
451
455
|
"CustomAssistance",
|
|
452
456
|
)
|
|
457
|
+
self.assertEqual(error.exception.data.text, "example")
|
|
458
|
+
self.assertEqual(error.exception.data.status_code, 404)
|
|
453
459
|
|
|
454
460
|
@parameterized.expand(
|
|
455
461
|
[
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/__init__.py
RENAMED
|
File without changes
|
{insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/unit/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/unit/test_api.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/unit/test_oauth.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/unit/utils.py
RENAMED
|
File without changes
|