From f27ed0985b9bf9c37a992dff4f925d388c08eb14 Mon Sep 17 00:00:00 2001 From: Adrian Galvan Date: Fri, 12 Jul 2024 15:48:35 -0700 Subject: [PATCH] Fixing assertion --- .../service/connectors/test_saas_connector.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/tests/ops/service/connectors/test_saas_connector.py b/tests/ops/service/connectors/test_saas_connector.py index 2fab59368b..e877711512 100644 --- a/tests/ops/service/connectors/test_saas_connector.py +++ b/tests/ops/service/connectors/test_saas_connector.py @@ -11,6 +11,7 @@ from fides.api.common_exceptions import ( AwaitingAsyncTaskCallback, + FidesopsException, SkippingConsentPropagation, ) from fides.api.graph.execution import ExecutionNode @@ -548,13 +549,15 @@ def test_request_with_invalid_output_template( execution_node = ExecutionNode(request_task) connector: SaaSConnector = get_connector(saas_example_connection_config) - assert connector.retrieve_data( - execution_node, - Policy(), - PrivacyRequest(id="123"), - request_task, - {"email": ["test@example.com"]}, - ) == [{"id": "123", "email": "test@example.com"}] + with pytest.raises(FidesopsException) as exc: + assert connector.retrieve_data( + execution_node, + Policy(), + PrivacyRequest(id="123"), + request_task, + {"email": ["test@example.com"]}, + ) == [{"id": "123", "email": "test@example.com"}] + assert "Failed to parse value as JSON" in str(exc) @pytest.mark.integration_saas