Skip to content

Batch4 sub batch1#978

Open
haggit-eliyahu wants to merge 11 commits into
mainfrom
batch4_subBatch1
Open

Batch4 sub batch1#978
haggit-eliyahu wants to merge 11 commits into
mainfrom
batch4_subBatch1

Conversation

@haggit-eliyahu

Copy link
Copy Markdown
Contributor

includes: akamai_integration, apache_kafka, azure_monitor, cisco_vulnerability_management, cloud_logging, cyber_ark_credential_provider, extrahop, gmail, google_forms, microsoft_graph_mail_delegated, microsoft_graph_security, mimecast, my_sql, nmap, okta, palo_alto_cortex_xdr, proof_point_tap, proofpoint_cloud_threat_response, pub_sub, screenshot_machine, service_desk_plus, service_desk_plus_v3, splunk, sysdig_secure, vertex_ai, web_risk, zerofox, zoho_desk, zscaler

@haggit-eliyahu haggit-eliyahu requested review from a team as code owners June 29, 2026 06:58
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces two new integrations, Akamai and Azure Monitor, into the repository. It includes the necessary core infrastructure, API clients, action definitions, and comprehensive test suites for both integrations. The changes enable users to interact with these services directly through the platform, facilitating tasks such as log searching, network list management, and connectivity testing.

Highlights

  • New Integrations Added: Added support for Akamai and Azure Monitor integrations, including core logic, authentication, and API clients.
  • New Actions Implemented: Implemented multiple actions for Akamai (Activate Client/Network List, Add/Remove Items, Get Lists, Ping) and Azure Monitor (Search Logs, Ping).
  • Testing and Documentation: Added comprehensive unit tests, mock data, and documentation for all new actions and integrations.
New Features

🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces two new integrations: Akamai and Azure Monitor, along with their respective actions, widgets, and tests. The code review identified several critical improvements: type annotations need correction or are missing in multiple actions (such as to_start_time_iso and _perform_action); internal imports within the Akamai integration must be relative; a defensive check is required in AddItemsToClientList to prevent potential IndexError crashes; redundant client initialization in AddItemsToNetworkList should be removed; and the Ping actions for both integrations must be updated to match the exact error message format specified in the style guide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +115 to +123
def _add_item_to_list(self, item: str) -> SingleJson:
item_payload: ClientListItemDetails = self._build_item_payload(item)
added_items: list[Any] = self.api_client.add_items_to_client_list(
list_id=self.target_client_list,
item_details=item_payload,
)
added_item_details: SingleJson = added_items[0].raw_data
added_item_details["status"] = "added"
return added_item_details

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Accessing added_items[0] directly without verifying if added_items is non-empty is unsafe. If the API returns an empty list of appended items, this will raise an unhandled IndexError and crash the action. Please implement a defensive check to ensure added_items contains elements before accessing them.

    def _add_item_to_list(self, item: str) -> SingleJson:
        item_payload: ClientListItemDetails = self._build_item_payload(item)
        added_items: list[Any] = self.api_client.add_items_to_client_list(
            list_id=self.target_client_list,
            item_details=item_payload,
        )
        if not added_items:
            raise exceptions.AkamaiManagerError(
                f"Failed to add item '{item}' to the client list."
            )
        added_item_details: SingleJson = added_items[0].raw_data
        added_item_details["status"] = "added"
        return added_item_details

LAST_WEEK = "Last Week"
LAST_MONTH = "Last Month"
CUSTOM = "Custom"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The to_start_time_iso method is annotated as returning datetime.date, but it actually returns a str (the result of start_time.isoformat()). Additionally, since datetime is imported as a class (from datetime import datetime), evaluating datetime.date will raise an AttributeError at runtime because the datetime class does not have a date attribute. Please correct the return type annotation to str.

Suggested change
def to_start_time_iso(self) -> str:
References
  1. All function parameters and return types must be annotated. (link)

Comment on lines +23 to +26
from akamai_integration.core import action_init
from akamai_integration.core import constants
from akamai_integration.core import exceptions
from akamai_integration.core import utils

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Internal imports within the integration must be relative rather than absolute. This ensures modularity and adheres to the repository style guide. Please update all absolute internal imports across the codebase to use relative imports.

Suggested change
from akamai_integration.core import action_init
from akamai_integration.core import constants
from akamai_integration.core import exceptions
from akamai_integration.core import utils
from ..core import action_init
from ..core import constants
from ..core import exceptions
from ..core import utils
References
  1. Internal imports must be relative: from ..core.Manager import ... not from Manager import ... (link)

Comment on lines +88 to +89
def _init_api_clients(self) -> None:
return action_init.create_api_client(self.soar_action)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The _init_api_clients method is annotated as returning None, but it actually returns the initialized ApiManager client instance. In the TIPCommon framework, the return value of _init_api_clients is assigned to self.api_client. Returning a value when the return type is annotated as None violates strict type checking rules. Please update the return type annotation to Any or import and use api_manager.ApiManager.

Suggested change
def _init_api_clients(self) -> None:
return action_init.create_api_client(self.soar_action)
def _init_api_clients(self) -> Any:
return action_init.create_api_client(self.soar_action)
References
  1. All function parameters and return types must be annotated. (link)


return names_filter, ids_filter

def _fetch_initial_client_lists(self, names_filter, ids_filter) -> list[ClientList]:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The parameters names_filter and ids_filter in _fetch_initial_client_lists are missing type annotations. To comply with the strict type checking guidelines, please add the appropriate type annotations.

Suggested change
def _fetch_initial_client_lists(self, names_filter, ids_filter) -> list[ClientList]:
def _fetch_initial_client_lists(
self,
names_filter: set[str],
ids_filter: set[str],
) -> list[ClientList]:
References
  1. All function parameters and return types must be annotated. (link)

Comment on lines +68 to +70
def _perform_action(self, _: Any = None) -> None:
try:
self._init_api_clients()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Calling self._init_api_clients() inside _perform_action is redundant and inefficient because the TIPCommon framework already executes this method during the action initialization phase. Please remove this redundant call.

Suggested change
def _perform_action(self, _: Any = None) -> None:
try:
self._init_api_clients()
def _perform_action(self, _: Any = None) -> None:
try:
network_list_id = self._get_network_list_id_from_params()

f"Successfully connected to the {INTEGRATION_NAME} server with "
"the provided connection parameters!"
)
ERROR_MESSAGE: str = f"Failed to connect to the {INTEGRATION_NAME} server!"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The failure message defined in ERROR_MESSAGE does not match the exact format required by the style guide. Please update the message to include the Error is {error} suffix.

Suggested change
ERROR_MESSAGE: str = f"Failed to connect to the {INTEGRATION_NAME} server!"
ERROR_MESSAGE: str = f"Failed to connect to the {INTEGRATION_NAME} server! Error is {{error}}"
References
  1. Every integration must have a Ping action with exact output messages, including 'Failed to connect to the {product name} server! Error is {error}' for failure. (link)

print_value=True,
)

def _perform_action(self, _=None):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The _perform_action method is missing a return type annotation, and its parameter _ is missing a type annotation. Please add the appropriate annotations to comply with the strict type checking guidelines.

Suggested change
def _perform_action(self, _=None):
def _perform_action(self, _: object = None) -> None:
References
  1. All function parameters and return types must be annotated. (link)

SUCCESS_MESSAGE: str = (
"Successfully connected to the Azure Monitor server with the provided "
"connection parameters!"
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The failure message defined in ERROR_MESSAGE does not match the exact format required by the style guide. Please update the message to include the Error is {error} suffix.

ERROR_MESSAGE: str = "Failed to connect to the Azure Monitor server! Error is {error}"
References
  1. Every integration must have a Ping action with exact output messages, including 'Failed to connect to the {product name} server! Error is {error}' for failure. (link)

# Create the HMAC SHA1 of the Base64 decoded secret key for the Authorization header
hmac_sha1 = hmac.new(
base64.b64decode(self.secret_key),
data_to_sign.encode(),
timestamp = int(arrow.now(pytz.utc).timestamp()) * 1000
auth_key = f"{api_key}{nonce}{timestamp}"
auth_key = auth_key.encode("utf-8")
api_key_hash = hashlib.sha256(auth_key).hexdigest()
TRANSFORM_DATA_SCRIPT_NAME = "Transform Data"

OAUTH_SCOPES = ["https://www.googleapis.com/auth/cloud-platform"]
API_ROOT_REGEX = r"https://((\w|-)+)-aiplatform.googleapis.com"
@github-actions

Copy link
Copy Markdown

Integration Tests Failed

Click to view the full report

🧩 pub_sub

✅ Passed ❌ Failed ⏭️ Skipped
2 6 0

❌ Failed Tests

tests/test_ping.py::TestPing::test_success
self = <pub_sub.tests.test_ping.TestPing object at 0x7f91f9e85150>
gcloud_pubsub_script_session = <pub_sub.tests.core.session.ApiSession object at 0x7f91f9e94e50>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f91f9fecc10>, _err=<_io.StringIO object at 0x7f91f9fed6c0>)

    @set_metadata(
        integration_config=CONFIG
    )
    def test_success(
            self,
            gcloud_pubsub_script_session: ApiSession,
            action_output: MockActionOutput,
    ) -> None:
        Ping(script_name=Constants.PING_SCRIPT_NAME).run()
    
>       assert len(gcloud_pubsub_script_session.request_history) >= 3
E       assert 0 >= 3
E        +  where 0 = len([])
E        +    where [] = <pub_sub.tests.core.session.ApiSession object at 0x7f91f9e94e50>.request_history

tests/test_ping.py:63: AssertionError
tests/test_ping.py::TestPing::test_invalid_email
self = <pub_sub.tests.test_ping.TestPing object at 0x7f91f9e87250>
gcloud_pubsub_script_session = <pub_sub.tests.core.session.ApiSession object at 0x7f91fa012ad0>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f91f9fee050>, _err=<_io.StringIO object at 0x7f91f9fec940>)

    @set_metadata(
        integration_config=CONFIG_WITH_INVALID_EMAIL
    )
    def test_invalid_email(
            self,
            gcloud_pubsub_script_session: ApiSession,
            action_output: MockActionOutput,
    ) -> None:
        Ping(script_name=Constants.PING_SCRIPT_NAME).run()
    
>       assert len(gcloud_pubsub_script_session.request_history) >= 2
E       assert 0 >= 2
E        +  where 0 = len([])
E        +    where [] = <pub_sub.tests.core.session.ApiSession object at 0x7f91fa012ad0>.request_history

tests/test_ping.py:99: AssertionError
tests/test_pubsub_connector.py::TestTestRun::test_connector_test_run_no_messages
self = <pub_sub.connectors.PubSubMessagesConnector.PubSubMessagesConnector object at 0x7f91f9e899d0>

    @output_handler
    def start(self) -> None:
        """
        Executes the connector logic.
    
        Execution steps:
    
            1. Extracting connector script parameters from the SDK connector object
            2. Validate parameters values
            3. Loading the connector context data via the SDK connector object
            4. Initializing the integrations manager(s)
            5. Fetching & parsing alerts from the product via integration manager
            6. Filtering the alerts
            7. Processing the filtered alerts into siemplify alerts
            8. Saving connector context data via the SDK connector object
            9. Sending newly created siemplify alerts to the platform
    
        Raises:
            ConnectorSetupError: if any of the pre-processing phases fail
        """
        self.logger.info(
            f"---------------- Starting connector {self.script_name} "
            "execution ----------------"
        )
        if self.is_test_run:
            self.logger.info(
                "****** This is an \"IDE Play Button\"\\\"Run Connector once\" "
                "test run ******"
            )
    
        self.logger.info(
            "------------------- Main - Param Init -------------------"
        )
        self.extract_params()
        self.logger.info(
            "------------------- Main - Started -------------------"
        )
        processed_alerts = []
    
        try:
            try:
                self.validate_params_wrapper()
                self.read_context_wrapper()
                self.logger.info("Initializing managers...")
>               self.init_managers()

connectors/PubSubMessagesConnector.py:214: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
connectors/PubSubMessagesConnector.py:67: in init_managers
    auth_manager = AuthManager(auth_manager_params, self.logger)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
core/PubSubAuthManager.py:153: in __init__
    self.credentials = build_credentials_from_sa(
.venv/lib/python3.11/site-packages/TIPCommon/rest/auth.py:224: in build_credentials_from_sa
    creds = get_impersonated_credentials(
.venv/lib/python3.11/site-packages/TIPCommon/rest/auth.py:361: in get_impersonated_credentials
    source_credentials = get_adc()[0]
                         ^^^^^^^^^
.venv/lib/python3.11/site-packages/TIPCommon/rest/auth.py:158: in get_adc
    return google.auth.default(scopes, request, quota_project_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/_default.py:714: in default
    credentials, project_id = checker()
                              ^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/_default.py:710: in <lambda>
    lambda: _get_gce_credentials(request, quota_project_id=quota_project_id),
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/_default.py:406: in _get_gce_credentials
    if _metadata.is_on_gce(request=request):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/compute_engine/_metadata.py:138: in is_on_gce
    if ping(request):
       ^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/compute_engine/_metadata.py:221: in ping
    response = request(
.venv/lib/python3.11/site-packages/google/auth/transport/requests.py:188: in __call__
    response = self.session.request(
.venv/lib/python3.11/site-packages/integration_testing/requests/session.py:89: in request
    response: MockResponse = self._do_request(method, request)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/integration_testing/requests/session.py:125: in _do_request
    self._validate_response(response, method, path)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pub_sub.tests.core.session.ApiSession object at 0x7f91f9ea8c10>
response = <object object at 0x7f91fdf2efa0>, method = 'GET', path = ''

    def _validate_response(
        self,
        response: Response,
        method: str,
        path: str,
    ) -> None:
        msg: str
        if response is None or response is NotImplemented:
            msg = (
                "Null or UnImplemented Response!"
                f" Request with method '{method}' to URL '{path}'"
                f" returned {response!r} instead of a response object."
                " Perhaps you forgot to return a response object in the correlating"
                " router."
            )
            raise RuntimeError(msg)
    
        if response is NO_RESPONSE:
            msg = (
                f"path '{path}' doesn't match with any of the other '{method}' "
                f"routes patterns: {list(self.routes[method].keys())}"
            )
>           raise ValueError(msg)
E           ValueError: path '' doesn't match with any of the other 'GET' routes patterns: ['/v1/projects/test-project/subscriptions/([a-zA-Z]|-|_)+', '/v1/projects/test-project/topics/([a-zA-Z]|-|_)+', '/computeMetadata/v1/instance/service-accounts/default/?$', '/computeMetadata/v1/instance/service-accounts/default/email', '/computeMetadata/v1/instance/service-accounts/(\\w|-)+@([a-zA-Z]|-|\\.)+\\.com/token']

.venv/lib/python3.11/site-packages/integration_testing/requests/session.py:150: ValueError

The above exception was the direct cause of the following exception:

self = <pub_sub.tests.test_pubsub_connector.TestTestRun object at 0x7f91f9e94590>
gcloud_pubsub_script_session = <pub_sub.tests.core.session.ApiSession object at 0x7f91f9ea8c10>
connector_output = <integration_testing.platform.script_output.MockConnectorOutput object at 0x7f91fa421450>

    @set_metadata(
            connector_def_file_path=DEF_PATH,
            parameters=DEFAULT_PARAMETERS,
            integration_config=CONFIG,
            input_context={"integrationContext": CONFIG}
    )
    def test_connector_test_run_no_messages(
            self,
            gcloud_pubsub_script_session: ApiSession,
            connector_output: MockConnectorOutput,
    ) -> None:
        set_is_test_run_to_true()
        connector = PubSubMessagesConnector()
        connector.siemplify.context.connector_info.identifier = (
            TEST_CONNECTOR_IDENTIFIER
        )
>       connector.start()

tests/test_pubsub_connector.py:83: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.venv/lib/python3.11/site-packages/soar_sdk/SiemplifyUtils.py:117: in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pub_sub.connectors.PubSubMessagesConnector.PubSubMessagesConnector object at 0x7f91f9e899d0>

    @output_handler
    def start(self) -> None:
        """
        Executes the connector logic.
    
        Execution steps:
    
            1. Extracting connector script parameters from the SDK connector object
            2. Validate parameters values
            3. Loading the connector context data via the SDK connector object
            4. Initializing the integrations manager(s)
            5. Fetching & parsing alerts from the product via integration manager
            6. Filtering the alerts
            7. Processing the filtered alerts into siemplify alerts
            8. Saving connector context data via the SDK connector object
            9. Sending newly created siemplify alerts to the platform
    
        Raises:
            ConnectorSetupError: if any of the pre-processing phases fail
        """
        self.logger.info(
            f"---------------- Starting connector {self.script_name} "
            "execution ----------------"
        )
        if self.is_test_run:
            self.logger.info(
                "****** This is an \"IDE Play Button\"\\\"Run Connector once\" "
                "test run ******"
            )
    
        self.logger.info(
            "------------------- Main - Param Init -------------------"
        )
        self.extract_params()
        self.logger.info(
            "------------------- Main - Started -------------------"
        )
        processed_alerts = []
    
        try:
            try:
                self.validate_params_wrapper()
                self.read_context_wrapper()
                self.logger.info("Initializing managers...")
                self.init_managers()
    
            # pylint: disable=try-except-raise
            except (
                BadGatewayError,
                DeadlineExceededError,
                ResourceExhaustedError,
                UnavailableError,
            ):
                raise
            except Exception as e:
>               raise ConnectorSetupError(e) from e
E               TIPCommon.exceptions.ConnectorSetupError: path '' doesn't match with any of the other 'GET' routes patterns: ['/v1/projects/test-project/subscriptions/([a-zA-Z]|-|_)+', '/v1/projects/test-project/topics/([a-zA-Z]|-|_)+', '/computeMetadata/v1/instance/service-accounts/default/?$', '/computeMetadata/v1/instance/service-accounts/default/email', '/computeMetadata/v1/instance/service-accounts/(\\w|-)+@([a-zA-Z]|-|\\.)+\\.com/token']

connectors/PubSubMessagesConnector.py:225: ConnectorSetupError
tests/test_pubsub_connector.py::TestConnectorExternalContext::test_connector_test_run_with_messages_no_context
self = <pub_sub.connectors.PubSubMessagesConnector.PubSubMessagesConnector object at 0x7f91fa654950>

    @output_handler
    def start(self) -> None:
        """
        Executes the connector logic.
    
        Execution steps:
    
            1. Extracting connector script parameters from the SDK connector object
            2. Validate parameters values
            3. Loading the connector context data via the SDK connector object
            4. Initializing the integrations manager(s)
            5. Fetching & parsing alerts from the product via integration manager
            6. Filtering the alerts
            7. Processing the filtered alerts into siemplify alerts
            8. Saving connector context data via the SDK connector object
            9. Sending newly created siemplify alerts to the platform
    
        Raises:
            ConnectorSetupError: if any of the pre-processing phases fail
        """
        self.logger.info(
            f"---------------- Starting connector {self.script_name} "
            "execution ----------------"
        )
        if self.is_test_run:
            self.logger.info(
                "****** This is an \"IDE Play Button\"\\\"Run Connector once\" "
                "test run ******"
            )
    
        self.logger.info(
            "------------------- Main - Param Init -------------------"
        )
        self.extract_params()
        self.logger.info(
            "------------------- Main - Started -------------------"
        )
        processed_alerts = []
    
        try:
            try:
                self.validate_params_wrapper()
                self.read_context_wrapper()
                self.logger.info("Initializing managers...")
>               self.init_managers()

connectors/PubSubMessagesConnector.py:214: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
connectors/PubSubMessagesConnector.py:67: in init_managers
    auth_manager = AuthManager(auth_manager_params, self.logger)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
core/PubSubAuthManager.py:153: in __init__
    self.credentials = build_credentials_from_sa(
.venv/lib/python3.11/site-packages/TIPCommon/rest/auth.py:224: in build_credentials_from_sa
    creds = get_impersonated_credentials(
.venv/lib/python3.11/site-packages/TIPCommon/rest/auth.py:361: in get_impersonated_credentials
    source_credentials = get_adc()[0]
                         ^^^^^^^^^
.venv/lib/python3.11/site-packages/TIPCommon/rest/auth.py:158: in get_adc
    return google.auth.default(scopes, request, quota_project_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/_default.py:714: in default
    credentials, project_id = checker()
                              ^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/_default.py:710: in <lambda>
    lambda: _get_gce_credentials(request, quota_project_id=quota_project_id),
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/_default.py:406: in _get_gce_credentials
    if _metadata.is_on_gce(request=request):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/compute_engine/_metadata.py:138: in is_on_gce
    if ping(request):
       ^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/compute_engine/_metadata.py:221: in ping
    response = request(
.venv/lib/python3.11/site-packages/google/auth/transport/requests.py:188: in __call__
    response = self.session.request(
.venv/lib/python3.11/site-packages/integration_testing/requests/session.py:89: in request
    response: MockResponse = self._do_request(method, request)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/integration_testing/requests/session.py:125: in _do_request
    self._validate_response(response, method, path)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pub_sub.tests.core.session.ApiSession object at 0x7f91fa9a4290>
response = <object object at 0x7f91fdf2efa0>, method = 'GET', path = ''

    def _validate_response(
        self,
        response: Response,
        method: str,
        path: str,
    ) -> None:
        msg: str
        if response is None or response is NotImplemented:
            msg = (
                "Null or UnImplemented Response!"
                f" Request with method '{method}' to URL '{path}'"
                f" returned {response!r} instead of a response object."
                " Perhaps you forgot to return a response object in the correlating"
                " router."
            )
            raise RuntimeError(msg)
    
        if response is NO_RESPONSE:
            msg = (
                f"path '{path}' doesn't match with any of the other '{method}' "
                f"routes patterns: {list(self.routes[method].keys())}"
            )
>           raise ValueError(msg)
E           ValueError: path '' doesn't match with any of the other 'GET' routes patterns: ['/v1/projects/test-project/subscriptions/([a-zA-Z]|-|_)+', '/v1/projects/test-project/topics/([a-zA-Z]|-|_)+', '/computeMetadata/v1/instance/service-accounts/default/?$', '/computeMetadata/v1/instance/service-accounts/default/email', '/computeMetadata/v1/instance/service-accounts/(\\w|-)+@([a-zA-Z]|-|\\.)+\\.com/token']

.venv/lib/python3.11/site-packages/integration_testing/requests/session.py:150: ValueError

The above exception was the direct cause of the following exception:

self = <pub_sub.tests.test_pubsub_connector.TestConnectorExternalContext object at 0x7f91f9e96610>
gcloud_pubsub_script_session = <pub_sub.tests.core.session.ApiSession object at 0x7f91fa9a4290>
connector_output = <integration_testing.platform.script_output.MockConnectorOutput object at 0x7f91fc6711b0>
product = Product(messages=[{'ackId': 'FixdRkhRNxkIaFEOT14jPzUgKEURBQBPAihdeTdUO0FdfAc-DRlyfWF0Y1kVCQFGAHlbXBEMb1ZcZzZRFbnF2utDS...sdWUiOiAicHJvamVjdC1sZXZlbCIKICB9XQp9', 'messageId': '12753109718606507', 'publishTime': '2024-11-26T11:22:48.957Z'}}])
external_context = MockExternalContext(_rows={})

    @set_metadata(
        connector_def_file_path=DEF_PATH,
        parameters=DEFAULT_PARAMETERS,
        external_context=MockExternalContext(),
        integration_config=CONFIG,
        input_context={"integrationContext": CONFIG}
    )
    def test_connector_test_run_with_messages_no_context(
            self,
            gcloud_pubsub_script_session: ApiSession,
            connector_output: MockConnectorOutput,
            product: Product,
            external_context: MockExternalContext,
    ) -> None:
        product.set_messages(MOCK_DATA["one_test_one_real"])
        set_is_test_run_to_true()
        connector = PubSubMessagesConnector()
        connector.siemplify.context.connector_info.identifier = (
            TEST_CONNECTOR_IDENTIFIER
        )
>       connector.start()

tests/test_pubsub_connector.py:112: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.venv/lib/python3.11/site-packages/soar_sdk/SiemplifyUtils.py:117: in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pub_sub.connectors.PubSubMessagesConnector.PubSubMessagesConnector object at 0x7f91fa654950>

    @output_handler
    def start(self) -> None:
        """
        Executes the connector logic.
    
        Execution steps:
    
            1. Extracting connector script parameters from the SDK connector object
            2. Validate parameters values
            3. Loading the connector context data via the SDK connector object
            4. Initializing the integrations manager(s)
            5. Fetching & parsing alerts from the product via integration manager
            6. Filtering the alerts
            7. Processing the filtered alerts into siemplify alerts
            8. Saving connector context data via the SDK connector object
            9. Sending newly created siemplify alerts to the platform
    
        Raises:
            ConnectorSetupError: if any of the pre-processing phases fail
        """
        self.logger.info(
            f"---------------- Starting connector {self.script_name} "
            "execution ----------------"
        )
        if self.is_test_run:
            self.logger.info(
                "****** This is an \"IDE Play Button\"\\\"Run Connector once\" "
                "test run ******"
            )
    
        self.logger.info(
            "------------------- Main - Param Init -------------------"
        )
        self.extract_params()
        self.logger.info(
            "------------------- Main - Started -------------------"
        )
        processed_alerts = []
    
        try:
            try:
                self.validate_params_wrapper()
                self.read_context_wrapper()
                self.logger.info("Initializing managers...")
                self.init_managers()
    
            # pylint: disable=try-except-raise
            except (
                BadGatewayError,
                DeadlineExceededError,
                ResourceExhaustedError,
                UnavailableError,
            ):
                raise
            except Exception as e:
>               raise ConnectorSetupError(e) from e
E               TIPCommon.exceptions.ConnectorSetupError: path '' doesn't match with any of the other 'GET' routes patterns: ['/v1/projects/test-project/subscriptions/([a-zA-Z]|-|_)+', '/v1/projects/test-project/topics/([a-zA-Z]|-|_)+', '/computeMetadata/v1/instance/service-accounts/default/?$', '/computeMetadata/v1/instance/service-accounts/default/email', '/computeMetadata/v1/instance/service-accounts/(\\w|-)+@([a-zA-Z]|-|\\.)+\\.com/token']

connectors/PubSubMessagesConnector.py:225: ConnectorSetupError
tests/test_pubsub_connector.py::TestConnectorExternalContext::test_connector_run_with_messages_ids
self = <pub_sub.tests.test_pubsub_connector.TestConnectorExternalContext object at 0x7f91f9e94510>
gcloud_pubsub_script_session = <pub_sub.tests.core.session.ApiSession object at 0x7f91fa9a5d10>
connector_output = <integration_testing.platform.script_output.MockConnectorOutput object at 0x7f91fbcef610>
product = Product(messages=[{'ackId': 'FixdRkhRNxkIaFEOT14jPzUgKEURBQBPAihdeTdUO0FdfAc-DRlyfWF0Y1kVCQFGAHlbXBEMb1ZcZzZRFbnF2utDS...sdWUiOiAicHJvamVjdC1sZXZlbCIKICB9XQp9', 'messageId': '12753109718606507', 'publishTime': '2024-11-26T11:22:48.957Z'}}])
external_context = MockExternalContext(_rows={})

    @set_metadata(
            connector_def_file_path=DEF_PATH,
            parameters=DEFAULT_PARAMETERS,
            external_context=MockExternalContext(),
            integration_config=CONFIG,
            input_context={"integrationContext": CONFIG}
    )
    def test_connector_run_with_messages_ids(
            self,
            gcloud_pubsub_script_session: ApiSession,
            connector_output: MockConnectorOutput,
            product: Product,
            external_context: MockExternalContext,
    ) -> None:
        product.set_messages(MOCK_DATA["one_test_one_real"])
        set_is_test_run_to_false()
        connector = PubSubMessagesConnector()
        connector.siemplify.context.connector_info.identifier = (
            TEST_CONNECTOR_IDENTIFIER
        )
        connector.start()
    
>       assert len(gcloud_pubsub_script_session.request_history) == 6
E       assert 0 == 6
E        +  where 0 = len([])
E        +    where [] = <pub_sub.tests.core.session.ApiSession object at 0x7f91fa9a5d10>.request_history

tests/test_pubsub_connector.py:149: AssertionError
tests/test_pubsub_connector.py::TestConnectorExternalContext::test_connector_run_with_messages_ids_and_non_json
self = <pub_sub.tests.test_pubsub_connector.TestConnectorExternalContext object at 0x7f91f9e94310>
gcloud_pubsub_script_session = <pub_sub.tests.core.session.ApiSession object at 0x7f91f9e36590>
connector_output = <integration_testing.platform.script_output.MockConnectorOutput object at 0x7f91fbc484c0>
product = Product(messages=[{'ackId': 'FixdRkhRNxkIaFEOT14jPzUgKEURBQBPAihdeTdUO0FdfAc-DRlyfWF0Y1kVCQFGAHlbXBEMb1ZcZzZRFbnF2utDS...'data': 'SW52YWxpZCBib2R5IG1lc3NhZ2U=', 'messageId': '12757464662191808', 'publishTime': '2024-11-27T12:53:52.695Z'}}])
external_context = MockExternalContext(_rows={})

    @set_metadata(
            connector_def_file_path=DEF_PATH,
            parameters=DEFAULT_PARAMETERS,
            external_context=MockExternalContext(),
            integration_config=CONFIG,
            input_context={"integrationContext": CONFIG}
    )
    def test_connector_run_with_messages_ids_and_non_json(
            self,
            gcloud_pubsub_script_session: ApiSession,
            connector_output: MockConnectorOutput,
            product: Product,
            external_context: MockExternalContext,
    ) -> None:
        product.set_messages(MOCK_DATA["two_real_one_broken"])
        set_is_test_run_to_false()
        connector = PubSubMessagesConnector()
        connector.siemplify.context.connector_info.identifier = (
            TEST_CONNECTOR_IDENTIFIER
        )
        connector.start()
    
>       assert len(gcloud_pubsub_script_session.request_history) == 5
E       assert 0 == 5
E        +  where 0 = len([])
E        +    where [] = <pub_sub.tests.core.session.ApiSession object at 0x7f91f9e36590>.request_history

tests/test_pubsub_connector.py:197: AssertionError

🧩 azure_monitor

✅ Passed ❌ Failed ⏭️ Skipped
0 1 0

❌ Failed Tests

Test Execution Failure
JSON report not found at /home/runner/work/content-hub/content-hub/content/response_integrations/google/azure_monitor/.report.json. The test execution script might have failed before running pytest.

🧩 web_risk

✅ Passed ❌ Failed ⏭️ Skipped
4 10 0

❌ Failed Tests

tests/test_enrich_entities/test_enrich_entities.py::TestAuth::test_invalid_email
self = <web_risk.tests.test_enrich_entities.test_enrich_entities.TestAuth object at 0x7f60b335c4d0>
script_session = <web_risk.tests.core.session.ApiSession object at 0x7f60b31daed0>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f60b3361c60>, _err=<_io.StringIO object at 0x7f60b3361ea0>)

    @set_metadata(
        integration_config=CONFIG_WITH_INVALID_EMAIL
    )
    def test_invalid_email(
            self,
            script_session: ApiSession,
            action_output: MockActionOutput,
    ) -> None:
        EnrichEntities().run()
    
>       assert len(script_session.request_history) >= 2
E       assert 0 >= 2
E        +  where 0 = len([])
E        +    where [] = <web_risk.tests.core.session.ApiSession object at 0x7f60b31daed0>.request_history

tests/test_enrich_entities/test_enrich_entities.py:92: AssertionError
tests/test_enrich_entities/test_enrich_entities.py::TestEnrichment::test_no_entities
self = <web_risk.tests.test_enrich_entities.test_enrich_entities.TestEnrichment object at 0x7f60b335cd50>
script_session = <web_risk.tests.core.session.ApiSession object at 0x7f60b3205850>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f60b3361bd0>, _err=<_io.StringIO object at 0x7f60b3361d80>)

    @set_metadata(
        integration_config=CONFIG
    )
    def test_no_entities(
            self,
            script_session: ApiSession,
            action_output: MockActionOutput,
    ) -> None:
        EnrichEntities().run()
    
>       assert len(script_session.request_history) >= 2
E       assert 0 >= 2
E        +  where 0 = len([])
E        +    where [] = <web_risk.tests.core.session.ApiSession object at 0x7f60b3205850>.request_history

tests/test_enrich_entities/test_enrich_entities.py:116: AssertionError
tests/test_enrich_entities/test_enrich_entities.py::TestEnrichment::test_valid_invalid
self = <web_risk.tests.test_enrich_entities.test_enrich_entities.TestEnrichment object at 0x7f60b335d290>
script_session = <web_risk.tests.core.session.ApiSession object at 0x7f60b31f6210>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f60b33620e0>, _err=<_io.StringIO object at 0x7f60b33627a0>)
product = Product(_threat_types_map={'https%3A//testsafebrowsing.appspot.com/s/malware.html': ['MALWARE']})

    @set_metadata(
        integration_config=CONFIG,
        entities=[
            DomainEntityInfo(
                identifier="https://domaiN.com",
                additional_properties={
                    "Environment": "Default Environment",
                    "OriginalIdentifier": "https://domain.com",
                },
                alert_identifier="test-alert",
                case_identifier=1,
                creation_time=unix_now(),
                modification_time=unix_now(),
                entity_type=EntityTypesEnum.URL.value,
                is_pivot=False,
                is_artifact=False,
                is_enriched=False,
                is_internal=False,
                is_suspicious=False,
                is_vulnerable=False,
            ),
            DomainEntityInfo(
                identifier="https://testSafebrowsing.appspot.com/s/malware.html",
                additional_properties={
                    "Environment": "Default Environment",
                    "OriginalIdentifier": (
                        "https://testsafebrowsing.appspot.com/s/malware.html"
                    )
                },
                alert_identifier="test-alert",
                case_identifier=1,
                creation_time=unix_now(),
                modification_time=unix_now(),
                entity_type=EntityTypesEnum.URL.value,
                is_pivot=False,
                is_artifact=False,
                is_enriched=False,
                is_internal=False,
                is_suspicious=False,
                is_vulnerable=False,
            )
        ]
    )
    def test_valid_invalid(
            self,
            script_session: ApiSession,
            action_output: MockActionOutput,
            product: Product,
    ) -> None:
        product.add_uri(
            quote("https://testsafebrowsing.appspot.com/s/malware.html"),
            ["MALWARE", ],
        )
    
        action_ = EnrichEntities()
        action_.soar_action.execution_deadline_unix_time_ms = unix_now() + 60_000
        action_.soar_action.session = script_session
        action_.run()
    
>       assert len(script_session.request_history) >= 5
E       assert 0 >= 5
E        +  where 0 = len([])
E        +    where [] = <web_risk.tests.core.session.ApiSession object at 0x7f60b31f6210>.request_history

tests/test_enrich_entities/test_enrich_entities.py:183: AssertionError
tests/test_ping.py::TestPing::test_success
self = <web_risk.tests.test_ping.TestPing object at 0x7f60b3598890>
script_session = <web_risk.tests.core.session.ApiSession object at 0x7f60b32d8390>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f60b33639a0>, _err=<_io.StringIO object at 0x7f60b3363d00>)

    @set_metadata(
        integration_config=CONFIG
    )
    def test_success(
            self,
            script_session: ApiSession,
            action_output: MockActionOutput,
    ) -> None:
        Ping(script_name=Constants.PING_SCRIPT_NAME).run()
    
>       assert len(script_session.request_history) >= 3
E       assert 0 >= 3
E        +  where 0 = len([])
E        +    where [] = <web_risk.tests.core.session.ApiSession object at 0x7f60b32d8390>.request_history

tests/test_ping.py:63: AssertionError
tests/test_ping.py::TestPing::test_invalid_email
self = <web_risk.tests.test_ping.TestPing object at 0x7f60b32f2810>
script_session = <web_risk.tests.core.session.ApiSession object at 0x7f60b3956510>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f60b4fcb640>, _err=<_io.StringIO object at 0x7f60b4fca560>)

    @set_metadata(
        integration_config=CONFIG_WITH_INVALID_EMAIL
    )
    def test_invalid_email(
            self,
            script_session: ApiSession,
            action_output: MockActionOutput,
    ) -> None:
        Ping(script_name=Constants.PING_SCRIPT_NAME).run()
    
>       assert len(script_session.request_history) >= 2
E       assert 0 >= 2
E        +  where 0 = len([])
E        +    where [] = <web_risk.tests.core.session.ApiSession object at 0x7f60b3956510>.request_history

tests/test_ping.py:103: AssertionError
tests/test_submit_entities/test_submit_entities.py::TestAuth::test_invalid_email
self = <web_risk.tests.test_submit_entities.test_submit_entities.TestAuth object at 0x7f60b3206110>
script_session = <web_risk.tests.core.session.ApiSession object at 0x7f60b34ec750>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f60b4fcb520>, _err=<_io.StringIO object at 0x7f60b4fcb490>)

    @set_metadata(
        integration_config=CONFIG_WITH_INVALID_EMAIL
    )
    def test_invalid_email(
            self,
            script_session: ApiSession,
            action_output: MockActionOutput,
    ) -> None:
        SubmitEntities().run()
    
>       assert len(script_session.request_history) >= 2
E       assert 0 >= 2
E        +  where 0 = len([])
E        +    where [] = <web_risk.tests.core.session.ApiSession object at 0x7f60b34ec750>.request_history

tests/test_submit_entities/test_submit_entities.py:103: AssertionError
tests/test_submit_entities/test_submit_entities.py::TestEnrichment::test_no_entities
self = <web_risk.tests.test_submit_entities.test_submit_entities.TestEnrichment object at 0x7f60b32068d0>
script_session = <web_risk.tests.core.session.ApiSession object at 0x7f60b31bf5d0>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f60b4fcb880>, _err=<_io.StringIO object at 0x7f60b4c643a0>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG,
    )
    def test_no_entities(
            self,
            script_session: ApiSession,
            action_output: MockActionOutput,
    ) -> None:
        SubmitEntities().run()
    
>       assert len(script_session.request_history) >= 2
E       assert 0 >= 2
E        +  where 0 = len([])
E        +    where [] = <web_risk.tests.core.session.ApiSession object at 0x7f60b31bf5d0>.request_history

tests/test_submit_entities/test_submit_entities.py:128: AssertionError
tests/test_submit_entities/test_submit_entities.py::TestEnrichment::test_valid_invalid
self = <web_risk.tests.test_submit_entities.test_submit_entities.TestEnrichment object at 0x7f60b3207210>
script_session = <web_risk.tests.core.session.ApiSession object at 0x7f60b34f5110>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f60b4c64f70>, _err=<_io.StringIO object at 0x7f60b4c657e0>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG,
        entities=[
            DomainEntityInfo(
                identifier="https://domaiN.com",
                additional_properties={
                    "Environment": "Default Environment",
                    "OriginalIdentifier": "https://domain.com",
                },
                alert_identifier="test-alert",
                case_identifier=1,
                creation_time=unix_now(),
                modification_time=unix_now(),
                entity_type=EntityTypesEnum.URL.value,
                is_pivot=False,
                is_artifact=False,
                is_enriched=False,
                is_internal=False,
                is_suspicious=False,
                is_vulnerable=False,
            ),
            DomainEntityInfo(
                identifier="https://testSafebrowsing.appspot.com/s/malware.html",
                additional_properties={
                    "Environment": "Default Environment",
                    "OriginalIdentifier": (
                        "https://testsafebrowsing.appspot.com/s/malware.html"
                    )
                },
                alert_identifier="test-alert",
                case_identifier=1,
                creation_time=unix_now(),
                modification_time=unix_now(),
                entity_type=EntityTypesEnum.URL.value,
                is_pivot=False,
                is_artifact=False,
                is_enriched=False,
                is_internal=False,
                is_suspicious=False,
                is_vulnerable=False,
            )
        ]
    )
    def test_valid_invalid(
            self,
            script_session: ApiSession,
            action_output: MockActionOutput,
    ) -> None:
        set_is_first_run_to_true()
        action_ = SubmitEntities()
        action_.soar_action.execution_deadline_unix_time_ms = unix_now() + 60_000
        action_.soar_action.async_total_duration_deadline = unix_now() + 60_000
        action_.soar_action.session = script_session
        action_.run()
    
>       assert len(script_session.request_history) >= 4
E       assert 0 >= 4
E        +  where 0 = len([])
E        +    where [] = <web_risk.tests.core.session.ApiSession object at 0x7f60b34f5110>.request_history

tests/test_submit_entities/test_submit_entities.py:192: AssertionError
tests/test_submit_entities/test_submit_entities.py::TestEnrichment::test_second_run
self = <web_risk.tests.test_submit_entities.test_submit_entities.TestEnrichment object at 0x7f60b3207350>
script_session = <web_risk.tests.core.session.ApiSession object at 0x7f60b3966990>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f60b4c65ea0>, _err=<_io.StringIO object at 0x7f60b4c66050>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_RUNNING,
        entities=[
            DomainEntityInfo(
                identifier="https://testSafebrowsing.appspot.com/s/malware.html",
                additional_properties={
                    "Environment": "Default Environment",
                    "OriginalIdentifier": (
                        "https://testsafebrowsing.appspot.com/s/malware.html"
                    )
                },
                alert_identifier="test-alert",
                case_identifier=1,
                creation_time=unix_now(),
                modification_time=unix_now(),
                entity_type=EntityTypesEnum.URL.value,
                is_pivot=False,
                is_artifact=False,
                is_enriched=False,
                is_internal=False,
                is_suspicious=False,
                is_vulnerable=False,
            )
        ]
    )
    def test_second_run(
            self,
            script_session: ApiSession,
            action_output: MockActionOutput,
    ) -> None:
        set_is_first_run_to_false()
        action_ = SubmitEntities()
        action_.soar_action.execution_deadline_unix_time_ms = unix_now() + 60_000
        action_.soar_action.async_total_duration_deadline = unix_now() + 60_000
        action_.soar_action.session = script_session
        action_.run()
    
>       assert len(script_session.request_history) >= 3
E       assert 0 >= 3
E        +  where 0 = len([])
E        +    where [] = <web_risk.tests.core.session.ApiSession object at 0x7f60b3966990>.request_history

tests/test_submit_entities/test_submit_entities.py:249: AssertionError
tests/test_submit_entities/test_submit_entities.py::TestEnrichment::test_second_run_timeout
self = <web_risk.tests.test_submit_entities.test_submit_entities.TestEnrichment object at 0x7f60b32077d0>
script_session = <web_risk.tests.core.session.ApiSession object at 0x7f60b32e7b90>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f60b4fcb880>, _err=<_io.StringIO object at 0x7f60b4fcb640>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_RUNNING,
        entities=[
            DomainEntityInfo(
                identifier="https://testSafebrowsing.appspot.com/s/malware.html",
                additional_properties={
                    "Environment": "Default Environment",
                    "OriginalIdentifier": (
                        "https://testsafebrowsing.appspot.com/s/malware.html"
                    )
                },
                alert_identifier="test-alert",
                case_identifier=1,
                creation_time=unix_now(),
                modification_time=unix_now(),
                entity_type=EntityTypesEnum.URL.value,
                is_pivot=False,
                is_artifact=False,
                is_enriched=False,
                is_internal=False,
                is_suspicious=False,
                is_vulnerable=False,
            )
        ]
    )
    def test_second_run_timeout(
            self,
            script_session: ApiSession,
            action_output: MockActionOutput,
    ) -> None:
        set_is_first_run_to_false()
        action_ = SubmitEntities()
        action_.soar_action.execution_deadline_unix_time_ms = unix_now() + 60_000
        action_.soar_action.session = script_session
        action_.run()
    
>       assert len(script_session.request_history) >= 2
E       assert 0 >= 2
E        +  where 0 = len([])
E        +    where [] = <web_risk.tests.core.session.ApiSession object at 0x7f60b32e7b90>.request_history

tests/test_submit_entities/test_submit_entities.py:299: AssertionError

🧩 sysdig_secure

✅ Passed ❌ Failed ⏭️ Skipped
0 1 0

❌ Failed Tests

Test Execution Failure
JSON report not found at /home/runner/work/content-hub/content-hub/content/response_integrations/google/sysdig_secure/.report.json. The test execution script might have failed before running pytest.

🧩 gmail

✅ Passed ❌ Failed ⏭️ Skipped
11 76 0

❌ Failed Tests

tests/add_email_label/test_add_email_label.py::TestInvalidParams::test_without_params
self = <gmail.tests.add_email_label.test_add_email_label.TestInvalidParams object at 0x7f4d6ed51f10>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6eb26050>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6edc5fc0>, _err=<_io.StringIO object at 0x7f4d6edc5630>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG
    )
    def test_without_params(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput,
    ) -> None:
        action = AddEmailLabel(script_name=Constants.ADD_EMAIL_LABEL_SCRIPT_NAME)
        action.run()
    
>       assert len(gmail_script_session.request_history) == 2
E       assert 0 == 2
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6eb26050>.request_history

tests/add_email_label/test_add_email_label.py:116: AssertionError
tests/add_email_label/test_add_email_label.py::TestInvalidParams::test_invalid_message_id
self = <gmail.tests.add_email_label.test_add_email_label.TestInvalidParams object at 0x7f4d6ed52490>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6eb0a090>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6edc6a70>, _err=<_io.StringIO object at 0x7f4d6eb4ca60>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MESSAGE_ID
    )
    def test_invalid_message_id(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        action = AddEmailLabel(script_name=Constants.ADD_EMAIL_LABEL_SCRIPT_NAME)
        action.run()
    
>       assert len(gmail_script_session.request_history) == 2
E       assert 0 == 2
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6eb0a090>.request_history

tests/add_email_label/test_add_email_label.py:141: AssertionError
tests/add_email_label/test_add_email_label.py::TestMessageID::test_search_message_by_message_id
self = <gmail.tests.add_email_label.test_add_email_label.TestMessageID object at 0x7f4d6ed52d10>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ec38150>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6eb4cf70>, _err=<_io.StringIO object at 0x7f4d6eb4d090>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MESSAGE_ID
    )
    def test_search_message_by_message_id(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
    
        action = AddEmailLabel(script_name=Constants.ADD_EMAIL_LABEL_SCRIPT_NAME)
        action.run()
    
>       assert len(gmail_script_session.request_history) == 3
E       assert 0 == 3
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ec38150>.request_history

tests/add_email_label/test_add_email_label.py:171: AssertionError
tests/add_email_label/test_add_email_label.py::TestFilter::test_search_message_default_filter
self = <gmail.tests.add_email_label.test_add_email_label.TestFilter object at 0x7f4d6ed53550>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ecc7d50>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6eb4d480>, _err=<_io.StringIO object at 0x7f4d6eb4d5a0>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MAILBOXES
    )
    def test_search_message_default_filter(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
    
        action = AddEmailLabel(script_name=Constants.ADD_EMAIL_LABEL_SCRIPT_NAME)
        action.run()
    
>       assert len(gmail_script_session.request_history) == 3
E       assert 0 == 3
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ecc7d50>.request_history

tests/add_email_label/test_add_email_label.py:199: AssertionError
tests/add_email_label/test_add_email_label.py::TestFilter::test_search_message_empty_filter
self = <gmail.tests.add_email_label.test_add_email_label.TestFilter object at 0x7f4d6ed53a90>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ed216d0>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6eb4d6c0>, _err=<_io.StringIO object at 0x7f4d6eb4dc60>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_EMPTY_FILTER
    )
    def test_search_message_empty_filter(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
    
        action = AddEmailLabel(script_name=Constants.ADD_EMAIL_LABEL_SCRIPT_NAME)
        action.run()
    
        assert len(gmail_script_session.request_history) == 0
>       assert action_output.results == ActionOutput(
            output_message=F"{ERROR} {EMPTY_PARAMS_MESSAGE}",
            result_value=False,
            execution_state=ExecutionState.FAILED,
            json_output=None,
        )
E       assert ActionOutput(...bug_output='') == ActionOutput(...bug_output='')
E         
E         Omitting 4 identical items, use -vv to show
E         Differing attributes:
E         ['output_message']
E         
E         Drill down into differing attribute output_message:
E           output_message: 'Error executing action "Add Email Label"\nReason: path \'\' doesn\'t match with any of the other \'GET\' routes patterns: [\'/computeMetadata/v1/instance/service-accounts/default/\', \'/computeMetadata/v1/instance/service-accounts/default/email\', \'/computeMetadata/v1/instance/service-accounts/\\\\w+@[a-zA-Z]+\\\\.com/token\']' != 'Error executing action "Add Email Label"\nReason: configure the "Internet Message ID" parameter or one of the "Subject Filter", "Labels Filter", "Sender Filter", or "Time Frame (minutes)" parameters.'
E           Skipping 39 identical leading characters in diff, use -v to show
E             "
E           - Reason: configure the "Internet Message ID" parameter or one of the "Subject Filter", "Labels Filter", "Sender Filter", or "Time Frame (minutes)" parameters.
E           + Reason: path '' doesn't match with any of the other 'GET' routes patterns: ['/computeMetadata/v1/instance/service-accounts/default/', '/computeMetadata/v1/instance/service-accounts/default/email', '/computeMetadata/v1/instance/service-accounts/\\w+@[a-zA-Z]+\\.com/token']

tests/add_email_label/test_add_email_label.py:226: AssertionError
tests/add_email_label/test_add_email_label.py::TestFilter::test_search_message_time_filter
self = <gmail.tests.add_email_label.test_add_email_label.TestFilter object at 0x7f4d6ed04110>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1782717703906'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6edeacd0>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6eb4dbd0>, _err=<_io.StringIO object at 0x7f4d6eb4e290>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_TIMEFRAME
    )
    def test_search_message_time_filter(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"][:1])
        google_gmail.set_messages(
            MOCK_DATA["mail_without_attachments"][1:],
            set_ts_to_now=True
        )
    
        action = AddEmailLabel(script_name=Constants.ADD_EMAIL_LABEL_SCRIPT_NAME)
        action.run()
    
>       assert len(gmail_script_session.request_history) == 3
E       assert 0 == 3
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6edeacd0>.request_history

tests/add_email_label/test_add_email_label.py:252: AssertionError
tests/add_email_label/test_add_email_label.py::TestFilter::test_invalid_label
self = <gmail.tests.add_email_label.test_add_email_label.TestFilter object at 0x7f4d6ed04790>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ede8410>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6eb4e7a0>, _err=<_io.StringIO object at 0x7f4d6eb4caf0>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_INVALID_LABEL
    )
    def test_invalid_label(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
    
        action = AddEmailLabel(script_name=Constants.ADD_EMAIL_LABEL_SCRIPT_NAME)
        action.run()
    
>       assert len(gmail_script_session.request_history) == 4
E       assert 0 == 4
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ede8410>.request_history

tests/add_email_label/test_add_email_label.py:278: AssertionError
tests/delete_email/test_delete_email.py::TestDeleteEmailInvalidParams::test_without_params
self = <gmail.tests.delete_email.test_delete_email.TestDeleteEmailInvalidParams object at 0x7f4d6ec41b90>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ed061d0>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6eb4e9e0>, _err=<_io.StringIO object at 0x7f4d6eb4cf70>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG
    )
    def test_without_params(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput,
    ) -> None:
        action = init_async_action(
            DeleteEmail,
            script_name=Constants.DELETE_EMAIL_SCRIPT_NAME
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 1
E       assert 0 == 1
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ed061d0>.request_history

tests/delete_email/test_delete_email.py:133: AssertionError
tests/delete_email/test_delete_email.py::TestDeleteEmailInvalidParams::test_no_messages_deleted
self = <gmail.tests.delete_email.test_delete_email.TestDeleteEmailInvalidParams object at 0x7f4d6ec42290>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ecb5110>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6eb4d090>, _err=<_io.StringIO object at 0x7f4d6eb4f130>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MAILBOXES
    )
    def test_no_messages_deleted(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput,
    ) -> None:
        action = init_async_action(
            DeleteEmail,
            script_name=Constants.DELETE_EMAIL_SCRIPT_NAME
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 1
E       assert 0 == 1
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ecb5110>.request_history

tests/delete_email/test_delete_email.py:158: AssertionError
tests/delete_email/test_delete_email.py::TestDeleteEmailInvalidParams::test_invalid_message_id
self = <gmail.tests.delete_email.test_delete_email.TestDeleteEmailInvalidParams object at 0x7f4d6ec42050>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6eb24d90>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6eb4dab0>, _err=<_io.StringIO object at 0x7f4d6eb4e290>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MESSAGE_ID,
    )
    def test_invalid_message_id(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        action = init_async_action(
            DeleteEmail,
            script_name=Constants.DELETE_EMAIL_SCRIPT_NAME
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 1
E       assert 0 == 1
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6eb24d90>.request_history

tests/delete_email/test_delete_email.py:183: AssertionError
tests/delete_email/test_delete_email.py::TestDeleteEmailInvalidParams::test_delete_message_empty_filter
self = <gmail.tests.delete_email.test_delete_email.TestDeleteEmailInvalidParams object at 0x7f4d6ec43010>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ecc7350>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6eb4f910>, _err=<_io.StringIO object at 0x7f4d6eb4fc70>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_EMPTY_FILTER
    )
    def test_delete_message_empty_filter(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
    
        action = init_async_action(
            DeleteEmail,
            script_name=Constants.DELETE_EMAIL_SCRIPT_NAME
        )
        action.run()
    
        assert len(gmail_script_session.request_history) == 0
>       assert action_output.results == ActionOutput(
            output_message=F"{ERROR} {EMPTY_PARAMS_MESSAGE}",
            result_value=False,
            execution_state=ExecutionState.FAILED,
            json_output=None,
        )
E       assert ActionOutput(...bug_output='') == ActionOutput(...bug_output='')
E         
E         Omitting 4 identical items, use -vv to show
E         Differing attributes:
E         ['output_message']
E         
E         Drill down into differing attribute output_message:
E           output_message: 'Error executing action "Delete Email"\nReason: path \'\' doesn\'t match with any of the other \'GET\' routes patterns: [\'/computeMetadata/v1/instance/service-accounts/default/\', \'/computeMetadata/v1/instance/service-accounts/default/email\', \'/computeMetadata/v1/instance/service-accounts/\\\\w+@[a-zA-Z]+\\\\.com/token\']' != 'Error executing action "Delete Email"\nReason: configure the "Internet Message ID" parameter or one of the "Subject Filter", "Labels Filter", "Sender Filter", or "Time Frame (minutes)" parameters.'
E           Skipping 36 identical leading characters in diff, use -v to show
E             "
E           - Reason: configure the "Internet Message ID" parameter or one of the "Subject Filter", "Labels Filter", "Sender Filter", or "Time Frame (minutes)" parameters.
E           + Reason: path '' doesn't match with any of the other 'GET' routes patterns: ['/computeMetadata/v1/instance/service-accounts/default/', '/computeMetadata/v1/instance/service-accounts/default/email', '/computeMetadata/v1/instance/service-accounts/\\w+@[a-zA-Z]+\\.com/token']

tests/delete_email/test_delete_email.py:212: AssertionError
tests/delete_email/test_delete_email.py::TestDeleteEmailInvalidParams::test_no_mailbox_found
self = <gmail.tests.delete_email.test_delete_email.TestDeleteEmailInvalidParams object at 0x7f4d6ec423d0>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ecc4d10>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6eb70430>, _err=<_io.StringIO object at 0x7f4d6eb70550>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_INVALID_MAILBOXES
    )
    def test_no_mailbox_found(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput,
    ) -> None:
        action = init_async_action(
            DeleteEmail,
            script_name=Constants.DELETE_EMAIL_SCRIPT_NAME,
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 1
E       assert 0 == 1
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ecc4d10>.request_history

tests/delete_email/test_delete_email.py:234: AssertionError
tests/delete_email/test_delete_email.py::TestDeleteEmailMessageId::test_delete_message_by_message_id
self = <gmail.tests.delete_email.test_delete_email.TestDeleteEmailMessageId object at 0x7f4d6ec3afd0>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ed88d10>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6eb70820>, _err=<_io.StringIO object at 0x7f4d6eb708b0>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MESSAGE_ID
    )
    def test_delete_message_by_message_id(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
    
        action = init_async_action(
            DeleteEmail,
            script_name=Constants.DELETE_EMAIL_SCRIPT_NAME
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 2
E       assert 0 == 2
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ed88d10>.request_history

tests/delete_email/test_delete_email.py:266: AssertionError
tests/delete_email/test_delete_email.py::TestDeleteEmailMessageId::test_trash_message_by_message_id
self = <gmail.tests.delete_email.test_delete_email.TestDeleteEmailMessageId object at 0x7f4d6ec3ba50>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6efa7e50>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6eb70670>, _err=<_io.StringIO object at 0x7f4d6eb705e0>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_TRASH_AND_MESSAGE_ID
    )
    def test_trash_message_by_message_id(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
    
        action = init_async_action(
            DeleteEmail,
            script_name=Constants.DELETE_EMAIL_SCRIPT_NAME
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 2
E       assert 0 == 2
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6efa7e50>.request_history

tests/delete_email/test_delete_email.py:304: AssertionError
tests/delete_email/test_delete_email.py::TestDeleteEmailFilter::test_delete_message_valid_invalid_mailbox
self = <gmail.tests.delete_email.test_delete_email.TestDeleteEmailFilter object at 0x7f4d6ec41a50>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6efa4050>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6eb716c0>, _err=<_io.StringIO object at 0x7f4d6eb71120>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MIXED_MAILBOXES
    )
    def test_delete_message_valid_invalid_mailbox(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
    
        action = init_async_action(
            DeleteEmail,
            script_name=Constants.DELETE_EMAIL_SCRIPT_NAME
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 4
E       assert 0 == 4
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6efa4050>.request_history

tests/delete_email/test_delete_email.py:345: AssertionError
tests/delete_email/test_delete_email.py::TestDeleteEmailFilter::test_delete_message_time_filter
self = <gmail.tests.delete_email.test_delete_email.TestDeleteEmailFilter object at 0x7f4d6ec3a890>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1782717704240'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ed89650>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6eb709d0>, _err=<_io.StringIO object at 0x7f4d6eb70c10>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_TIMEFRAME
    )
    def test_delete_message_time_filter(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"][:1])
        google_gmail.set_messages(
            MOCK_DATA["mail_without_attachments"][1:],
            set_ts_to_now=True
        )
    
        action = init_async_action(
            DeleteEmail,
            script_name=Constants.DELETE_EMAIL_SCRIPT_NAME
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 2
E       assert 0 == 2
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ed89650>.request_history

tests/delete_email/test_delete_email.py:394: AssertionError
tests/delete_email/test_delete_email.py::TestAsyncTimeout::test_delete_timeout
self = <gmail.tests.delete_email.test_delete_email.TestAsyncTimeout object at 0x7f4d6ec3b810>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ec5f890>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6eb703a0>, _err=<_io.StringIO object at 0x7f4d6eb70af0>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MESSAGE_ID
    )
    def test_delete_timeout(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        action = init_async_action(
            DeleteEmail,
            script_name=Constants.DELETE_EMAIL_SCRIPT_NAME,
            async_timeout_ms=1
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 1
E       assert 0 == 1
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ec5f890>.request_history

tests/delete_email/test_delete_email.py:432: AssertionError
tests/forward_email/test_forward_email.py::TestAuth::test_invalid_email
self = <gmail.tests.forward_email.test_forward_email.TestAuth object at 0x7f4d6ec4a610>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ed05890>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6eb711b0>, _err=<_io.StringIO object at 0x7f4d6eb70ca0>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG
    )
    def test_invalid_email(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput,
    ) -> None:
        ForwardEmail(script_name=Constants.FORWARD_EMAIL_SCRIPT_NAME).run()
    
>       assert len(gmail_script_session.request_history) == 1
E       assert 0 == 1
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ed05890>.request_history

tests/forward_email/test_forward_email.py:133: AssertionError
tests/forward_email/test_forward_email.py::TestForwardEmail::test_with_no_params
self = <gmail.tests.forward_email.test_forward_email.TestForwardEmail object at 0x7f4d6ec4b690>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ec07810>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6eb71bd0>, _err=<_io.StringIO object at 0x7f4d6eb70b80>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MESSAGE_ID
    )
    def test_with_no_params(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
        action = ForwardEmail(script_name=Constants.FORWARD_EMAIL_SCRIPT_NAME)
        action.run()
    
>       assert len(gmail_script_session.request_history) == 5
E       assert 0 == 5
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ec07810>.request_history

tests/forward_email/test_forward_email.py:158: AssertionError
tests/forward_email/test_forward_email.py::TestForwardEmail::test_with_csv_reply_to
self = <gmail.tests.forward_email.test_forward_email.TestForwardEmail object at 0x7f4d6ec4b310>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ed78190>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6eb71ab0>, _err=<_io.StringIO object at 0x7f4d6eb72b90>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_COMMA_SEPARATED_PARAMS
    )
    def test_with_csv_reply_to(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
        action = ForwardEmail(script_name=Constants.FORWARD_EMAIL_SCRIPT_NAME)
        action.run()
    
>       assert len(gmail_script_session.request_history) == 5
E       assert 0 == 5
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ed78190>.request_history

tests/forward_email/test_forward_email.py:186: AssertionError
tests/forward_email/test_forward_email.py::TestForwardEmail::test_with_attachments
self = <gmail.tests.forward_email.test_forward_email.TestForwardEmail object at 0x7f4d6ec4bd50>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6eddfe10>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6eb716c0>, _err=<_io.StringIO object at 0x7f4d6eb72ef0>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_ATTACHMENTS
    )
    def test_with_attachments(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
        action = ForwardEmail(script_name=Constants.FORWARD_EMAIL_SCRIPT_NAME)
        action.run()
        delete_test_attachments(ACTION_CONFIG_WITH_ATTACHMENTS["Attachments Paths"])
    
>       assert len(gmail_script_session.request_history) == 5
E       assert 0 == 5
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6eddfe10>.request_history

tests/forward_email/test_forward_email.py:215: AssertionError
tests/forward_email/test_forward_email.py::TestForwardEmail::test_with_attachments_in_original_email
self = <gmail.tests.forward_email.test_forward_email.TestForwardEmail object at 0x7f4d702a7710>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...FVTOkNPTkZJUk1FRA0KU1VNTUFSWTpUZXN0IEdtYWlsDQpUUkFOU1A6T1BBUVVFDQpFTkQ6VkVWRU5UDQpFTkQ6VkNBTEVOREFSDQo='}}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ebda9d0>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6eb73130>, _err=<_io.StringIO object at 0x7f4d6eb73520>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_EMAIL_WITH_ATTACHMENTS
    )
    def test_with_attachments_in_original_email(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(
            MOCK_DATA["mail_without_attachments"] + MOCK_DATA["mail_with_eml"]
        )
        google_gmail.set_attachments(MOCK_DATA["attachments"])
        action = ForwardEmail(script_name=Constants.FORWARD_EMAIL_SCRIPT_NAME)
        action.run()
    
>       assert len(gmail_script_session.request_history) == 7
E       assert 0 == 7
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ebda9d0>.request_history

tests/forward_email/test_forward_email.py:246: AssertionError
tests/remove_email_label/test_remove_email_label.py::TestInvalidParams::test_without_params
self = <gmail.tests.remove_email_label.test_remove_email_label.TestInvalidParams object at 0x7f4d6ec59750>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ebda350>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6eb72cb0>, _err=<_io.StringIO object at 0x7f4d6eb73490>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG
    )
    def test_without_params(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput,
    ) -> None:
        action = RemoveEmailLabel(script_name=Constants.REMOVE_EMAIL_LABEL_SCRIPT_NAME)
        action.run()
    
>       assert len(gmail_script_session.request_history) == 2
E       assert 0 == 2
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ebda350>.request_history

tests/remove_email_label/test_remove_email_label.py:120: AssertionError
tests/remove_email_label/test_remove_email_label.py::TestInvalidParams::test_invalid_message_id
self = <gmail.tests.remove_email_label.test_remove_email_label.TestInvalidParams object at 0x7f4d6ec5a190>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ec0b0d0>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6eb72b90>, _err=<_io.StringIO object at 0x7f4d6eb71bd0>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MESSAGE_ID
    )
    def test_invalid_message_id(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        action = RemoveEmailLabel(script_name=Constants.REMOVE_EMAIL_LABEL_SCRIPT_NAME)
        action.run()
    
>       assert len(gmail_script_session.request_history) == 2
E       assert 0 == 2
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ec0b0d0>.request_history

tests/remove_email_label/test_remove_email_label.py:145: AssertionError
tests/remove_email_label/test_remove_email_label.py::TestMessageID::test_search_message_by_message_id
self = <gmail.tests.remove_email_label.test_remove_email_label.TestMessageID object at 0x7f4d6ec5aa50>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ea05d90>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6ebe9090>, _err=<_io.StringIO object at 0x7f4d6ebe9000>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MESSAGE_ID
    )
    def test_search_message_by_message_id(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
    
        action = RemoveEmailLabel(script_name=Constants.REMOVE_EMAIL_LABEL_SCRIPT_NAME)
        action.run()
    
>       assert len(gmail_script_session.request_history) == 3
E       assert 0 == 3
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ea05d90>.request_history

tests/remove_email_label/test_remove_email_label.py:175: AssertionError
tests/remove_email_label/test_remove_email_label.py::TestFilter::test_search_message_default_filter
self = <gmail.tests.remove_email_label.test_remove_email_label.TestFilter object at 0x7f4d6ec5b790>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6eb51e50>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6eb4dc60>, _err=<_io.StringIO object at 0x7f4d6eb4db40>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MAILBOXES
    )
    def test_search_message_default_filter(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
    
        action = RemoveEmailLabel(script_name=Constants.REMOVE_EMAIL_LABEL_SCRIPT_NAME)
        action.run()
    
>       assert len(gmail_script_session.request_history) == 3
E       assert 0 == 3
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6eb51e50>.request_history

tests/remove_email_label/test_remove_email_label.py:203: AssertionError
tests/remove_email_label/test_remove_email_label.py::TestFilter::test_search_message_empty_filter
self = <gmail.tests.remove_email_label.test_remove_email_label.TestFilter object at 0x7f4d6ec5bed0>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6edd23d0>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6edc6050>, _err=<_io.StringIO object at 0x7f4d6edc5f30>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_EMPTY_FILTER
    )
    def test_search_message_empty_filter(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
    
        action = RemoveEmailLabel(script_name=Constants.REMOVE_EMAIL_LABEL_SCRIPT_NAME)
        action.run()
    
        assert len(gmail_script_session.request_history) == 0
>       assert action_output.results == ActionOutput(
            output_message=F"{ERROR} {EMPTY_PARAMS_MESSAGE}",
            result_value=False,
            execution_state=ExecutionState.FAILED,
            json_output=None,
        )
E       assert ActionOutput(...bug_output='') == ActionOutput(...bug_output='')
E         
E         Omitting 4 identical items, use -vv to show
E         Differing attributes:
E         ['output_message']
E         
E         Drill down into differing attribute output_message:
E           output_message: 'Error executing action "Remove Email Label"\nReason: path \'\' doesn\'t match with any of the other \'GET\' routes patterns: [\'/computeMetadata/v1/instance/service-accounts/default/\', \'/computeMetadata/v1/instance/service-accounts/default/email\', \'/computeMetadata/v1/instance/service-accounts/\\\\w+@[a-zA-Z]+\\\\.com/token\']' != 'Error executing action "Remove Email Label"\nReason: configure the "Internet Message ID" parameter or one of the "Subject Filter", "Labels Filter", "Sender Filter", or "Time Frame (minutes)" parameters.'
E           Skipping 42 identical leading characters in diff, use -v to show
E             "
E           - Reason: configure the "Internet Message ID" parameter or one of the "Subject Filter", "Labels Filter", "Sender Filter", or "Time Frame (minutes)" parameters.
E           + Reason: path '' doesn't match with any of the other 'GET' routes patterns: ['/computeMetadata/v1/instance/service-accounts/default/', '/computeMetadata/v1/instance/service-accounts/default/email', '/computeMetadata/v1/instance/service-accounts/\\w+@[a-zA-Z]+\\.com/token']

tests/remove_email_label/test_remove_email_label.py:230: AssertionError
tests/remove_email_label/test_remove_email_label.py::TestFilter::test_search_message_time_filter
self = <gmail.tests.remove_email_label.test_remove_email_label.TestFilter object at 0x7f4d6ec5dd10>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1782717704795'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ec9b490>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6eb731c0>, _err=<_io.StringIO object at 0x7f4d6eb73490>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_TIMEFRAME
    )
    def test_search_message_time_filter(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"][:1])
        google_gmail.set_messages(
            MOCK_DATA["mail_without_attachments"][1:],
            set_ts_to_now=True
        )
    
        action = RemoveEmailLabel(script_name=Constants.REMOVE_EMAIL_LABEL_SCRIPT_NAME)
        action.run()
    
>       assert len(gmail_script_session.request_history) == 3
E       assert 0 == 3
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ec9b490>.request_history

tests/remove_email_label/test_remove_email_label.py:256: AssertionError
tests/remove_email_label/test_remove_email_label.py::TestFilter::test_invalid_label
self = <gmail.tests.remove_email_label.test_remove_email_label.TestFilter object at 0x7f4d6ec5ed10>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ec2e990>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6eb4d6c0>, _err=<_io.StringIO object at 0x7f4d6eb4f880>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_INVALID_LABEL
    )
    def test_invalid_label(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
    
        action = RemoveEmailLabel(script_name=Constants.REMOVE_EMAIL_LABEL_SCRIPT_NAME)
        action.run()
    
>       assert len(gmail_script_session.request_history) == 1
E       assert 0 == 1
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ec2e990>.request_history

tests/remove_email_label/test_remove_email_label.py:282: AssertionError
tests/remove_email_label/test_remove_email_label.py::TestFilter::test_mixed_labels
self = <gmail.tests.remove_email_label.test_remove_email_label.TestFilter object at 0x7f4d6ec5d7d0>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6efe7e10>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6ebe9360>, _err=<_io.StringIO object at 0x7f4d6ebe92d0>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MIXED_LABELS
    )
    def test_mixed_labels(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
    
        action = RemoveEmailLabel(script_name=Constants.REMOVE_EMAIL_LABEL_SCRIPT_NAME)
        action.run()
    
>       assert len(gmail_script_session.request_history) == 3
E       assert 0 == 3
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6efe7e10>.request_history

tests/remove_email_label/test_remove_email_label.py:306: AssertionError
tests/save_email_to_the_case/test_save_email_to_the_case.py::TestAuth::test_invalid_email
self = <gmail.tests.save_email_to_the_case.test_save_email_to_the_case.TestAuth object at 0x7f4d6ecd2c90>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6edf5a90>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6ebe9a20>, _err=<_io.StringIO object at 0x7f4d6ebe9990>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG
    )
    def test_invalid_email(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput,
    ) -> None:
        SaveEmailToTheCase(script_name=Constants.SAVE_EMAIL_TO_THE_CASE).run()
    
>       assert len(gmail_script_session.request_history) == 1
E       assert 0 == 1
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6edf5a90>.request_history

tests/save_email_to_the_case/test_save_email_to_the_case.py:125: AssertionError
tests/save_email_to_the_case/test_save_email_to_the_case.py::TestSaveEmail::test_with_no_params
self = <gmail.tests.save_email_to_the_case.test_save_email_to_the_case.TestSaveEmail object at 0x7f4d6ecd1bd0>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_sync_session = <gmail.tests.core.session.GoogleGmailSession object at 0x7f4d6edf6490>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ec24a10>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6ebe9e10>, _err=<_io.StringIO object at 0x7f4d6ebe9ab0>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MESSAGE_ID
    )
    def test_with_no_params(
            self,
            google_gmail: GoogleGmail,
            gmail_sync_session: GoogleGmailSession,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
        action = SaveEmailToTheCase(script_name=Constants.SAVE_EMAIL_TO_THE_CASE)
        action.soar_action.session = gmail_sync_session
        action.run()
    
>       assert len(gmail_script_session.request_history) == 3
E       assert 0 == 3
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ec24a10>.request_history

tests/save_email_to_the_case/test_save_email_to_the_case.py:152: AssertionError
tests/save_email_to_the_case/test_save_email_to_the_case.py::TestSaveEmail::test_with_base64_encode
self = <gmail.tests.save_email_to_the_case.test_save_email_to_the_case.TestSaveEmail object at 0x7f4d6ecd1110>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_sync_session = <gmail.tests.core.session.GoogleGmailSession object at 0x7f4d6ec25090>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ec763d0>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6ebeb010>, _err=<_io.StringIO object at 0x7f4d6ebeaef0>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_BASE64_ENCODE
    )
    def test_with_base64_encode(
            self,
            google_gmail: GoogleGmail,
            gmail_sync_session: GoogleGmailSession,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
        action = SaveEmailToTheCase(script_name=Constants.SAVE_EMAIL_TO_THE_CASE)
        action.soar_action.session = gmail_sync_session
        action.run()
    
>       assert len(gmail_script_session.request_history) == 3
E       assert 0 == 3
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ec763d0>.request_history

tests/save_email_to_the_case/test_save_email_to_the_case.py:183: AssertionError
tests/save_email_to_the_case/test_save_email_to_the_case.py::TestSaveEmail::test_with_attachments_filtered
self = <gmail.tests.save_email_to_the_case.test_save_email_to_the_case.TestSaveEmail object at 0x7f4d6ecd2790>
google_gmail = GoogleGmail(messages={'190ee8f88c8a5f34': {'id': '190ee8f88c8a5f34', 'threadId': '190ee8f88c8a5f34', 'labelIds': ['CAT...FVTOkNPTkZJUk1FRA0KU1VNTUFSWTpUZXN0IEdtYWlsDQpUUkFOU1A6T1BBUVVFDQpFTkQ6VkVWRU5UDQpFTkQ6VkNBTEVOREFSDQo='}}, threads={})
gmail_sync_session = <gmail.tests.core.session.GoogleGmailSession object at 0x7f4d6edde7d0>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6eb60d50>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6ebeb760>, _err=<_io.StringIO object at 0x7f4d6ebeb370>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_ATTACHMENTS_FILTERED
    )
    def test_with_attachments_filtered(
            self,
            google_gmail: GoogleGmail,
            gmail_sync_session: GoogleGmailSession,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_with_files"])
        google_gmail.set_attachments(MOCK_DATA["attachments"])
        action = SaveEmailToTheCase(script_name=Constants.SAVE_EMAIL_TO_THE_CASE)
        action.soar_action.session = gmail_sync_session
        action.run()
    
>       assert len(gmail_script_session.request_history) == 4
E       assert 0 == 4
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6eb60d50>.request_history

tests/save_email_to_the_case/test_save_email_to_the_case.py:215: AssertionError
tests/save_email_to_the_case/test_save_email_to_the_case.py::TestSaveEmail::test_with_attachments
self = <gmail.tests.save_email_to_the_case.test_save_email_to_the_case.TestSaveEmail object at 0x7f4d6ecd2b10>
google_gmail = GoogleGmail(messages={'190ee8f88c8a5f34': {'id': '190ee8f88c8a5f34', 'threadId': '190ee8f88c8a5f34', 'labelIds': ['CAT...FVTOkNPTkZJUk1FRA0KU1VNTUFSWTpUZXN0IEdtYWlsDQpUUkFOU1A6T1BBUVVFDQpFTkQ6VkVWRU5UDQpFTkQ6VkNBTEVOREFSDQo='}}, threads={})
gmail_sync_session = <gmail.tests.core.session.GoogleGmailSession object at 0x7f4d6ecb65d0>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ebc5b90>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6ebeb6d0>, _err=<_io.StringIO object at 0x7f4d6ebeb880>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_ATTACHMENTS
    )
    def test_with_attachments(
            self,
            google_gmail: GoogleGmail,
            gmail_sync_session: GoogleGmailSession,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_with_files"])
        google_gmail.set_attachments(MOCK_DATA["attachments"])
        action = SaveEmailToTheCase(script_name=Constants.SAVE_EMAIL_TO_THE_CASE)
        action.soar_action.session = gmail_sync_session
        action.run()
    
>       assert len(gmail_script_session.request_history) == 4
E       assert 0 == 4
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ebc5b90>.request_history

tests/save_email_to_the_case/test_save_email_to_the_case.py:250: AssertionError
tests/save_email_to_the_case/test_save_email_to_the_case.py::TestSaveEmail::test_with_attachments_and_encode
self = <gmail.tests.save_email_to_the_case.test_save_email_to_the_case.TestSaveEmail object at 0x7f4d6ecd2f10>
google_gmail = GoogleGmail(messages={'190ee8f88c8a5f34': {'id': '190ee8f88c8a5f34', 'threadId': '190ee8f88c8a5f34', 'labelIds': ['CAT...FVTOkNPTkZJUk1FRA0KU1VNTUFSWTpUZXN0IEdtYWlsDQpUUkFOU1A6T1BBUVVFDQpFTkQ6VkVWRU5UDQpFTkQ6VkNBTEVOREFSDQo='}}, threads={})
gmail_sync_session = <gmail.tests.core.session.GoogleGmailSession object at 0x7f4d6ed7b490>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6eb14790>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6ebebd90>, _err=<_io.StringIO object at 0x7f4d6ebeb250>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_ATTACHMENTS_AND_ENCODE
    )
    def test_with_attachments_and_encode(
            self,
            google_gmail: GoogleGmail,
            gmail_sync_session: GoogleGmailSession,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_with_files"])
        google_gmail.set_attachments(MOCK_DATA["attachments"])
        action = SaveEmailToTheCase(script_name=Constants.SAVE_EMAIL_TO_THE_CASE)
        action.soar_action.session = gmail_sync_session
        action.run()
    
>       assert len(gmail_script_session.request_history) == 5
E       assert 0 == 5
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6eb14790>.request_history

tests/save_email_to_the_case/test_save_email_to_the_case.py:287: AssertionError
tests/search_for_emails/test_search_for_emails.py::TestInvalidParams::test_without_params
self = <gmail.tests.search_for_emails.test_search_for_emails.TestInvalidParams object at 0x7f4d6ec17310>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ea11c50>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6eb73370>, _err=<_io.StringIO object at 0x7f4d6ea2c430>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG
    )
    def test_without_params(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput,
    ) -> None:
        action = init_async_action(
            SearchForEmails,
            script_name=Constants.SEARCH_FOR_EMAILS_SCRIPT_NAME,
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 1
E       assert 0 == 1
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ea11c50>.request_history

tests/search_for_emails/test_search_for_emails.py:125: AssertionError
tests/search_for_emails/test_search_for_emails.py::TestInvalidParams::test_no_messages_found
self = <gmail.tests.search_for_emails.test_search_for_emails.TestInvalidParams object at 0x7f4d6ec15c90>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ea16b10>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6ebeb490>, _err=<_io.StringIO object at 0x7f4d6ea2cb80>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MAILBOXES
    )
    def test_no_messages_found(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput,
    ) -> None:
        action = init_async_action(
            SearchForEmails,
            script_name=Constants.SEARCH_FOR_EMAILS_SCRIPT_NAME,
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 1
E       assert 0 == 1
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ea16b10>.request_history

tests/search_for_emails/test_search_for_emails.py:150: AssertionError
tests/search_for_emails/test_search_for_emails.py::TestInvalidParams::test_no_mailbox_found
self = <gmail.tests.search_for_emails.test_search_for_emails.TestInvalidParams object at 0x7f4d6ec14710>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6edd0b10>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6ea2d2d0>, _err=<_io.StringIO object at 0x7f4d6ea2d090>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_INVALID_MAILBOXES
    )
    def test_no_mailbox_found(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput,
    ) -> None:
        action = init_async_action(
            SearchForEmails,
            script_name=Constants.SEARCH_FOR_EMAILS_SCRIPT_NAME,
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 1
E       assert 0 == 1
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6edd0b10>.request_history

tests/search_for_emails/test_search_for_emails.py:175: AssertionError
tests/search_for_emails/test_search_for_emails.py::TestInvalidParams::test_invalid_message_id
self = <gmail.tests.search_for_emails.test_search_for_emails.TestInvalidParams object at 0x7f4d6ec16ad0>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ebd2010>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6ea2c3a0>, _err=<_io.StringIO object at 0x7f4d6ea2d750>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MESSAGE_ID
    )
    def test_invalid_message_id(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        action = init_async_action(
            SearchForEmails,
            script_name=Constants.SEARCH_FOR_EMAILS_SCRIPT_NAME,
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 1
E       assert 0 == 1
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ebd2010>.request_history

tests/search_for_emails/test_search_for_emails.py:199: AssertionError
tests/search_for_emails/test_search_for_emails.py::TestMessageID::test_search_message_by_message_id
self = <gmail.tests.search_for_emails.test_search_for_emails.TestMessageID object at 0x7f4d6f5a5050>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ea5c050>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6ebeb490>, _err=<_io.StringIO object at 0x7f4d6ebeb010>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MESSAGE_ID
    )
    def test_search_message_by_message_id(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
    
        action = init_async_action(
            SearchForEmails,
            script_name=Constants.SEARCH_FOR_EMAILS_SCRIPT_NAME,
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 2
E       assert 0 == 2
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ea5c050>.request_history

tests/search_for_emails/test_search_for_emails.py:229: AssertionError
tests/search_for_emails/test_search_for_emails.py::TestFilter::test_search_message_empty_filter
self = <gmail.tests.search_for_emails.test_search_for_emails.TestFilter object at 0x7f4d6ec24f90>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ea55e50>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6ea2d090>, _err=<_io.StringIO object at 0x7f4d6ea2e0e0>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MAILBOXES
    )
    def test_search_message_empty_filter(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
    
        action = init_async_action(
            SearchForEmails,
            script_name=Constants.SEARCH_FOR_EMAILS_SCRIPT_NAME,
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 3
E       assert 0 == 3
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ea55e50>.request_history

tests/search_for_emails/test_search_for_emails.py:261: AssertionError
tests/search_for_emails/test_search_for_emails.py::TestFilter::test_search_message_valid_invalid_mailbox
self = <gmail.tests.search_for_emails.test_search_for_emails.TestFilter object at 0x7f4d6ec26690>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6eb15ed0>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6ea2e7a0>, _err=<_io.StringIO object at 0x7f4d6ea2d990>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MIXED_MAILBOXES
    )
    def test_search_message_valid_invalid_mailbox(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
    
        action = init_async_action(
            SearchForEmails,
            script_name=Constants.SEARCH_FOR_EMAILS_SCRIPT_NAME,
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 4
E       assert 0 == 4
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6eb15ed0>.request_history

tests/search_for_emails/test_search_for_emails.py:291: AssertionError
tests/search_for_emails/test_search_for_emails.py::TestFilter::test_search_message_time_filter
self = <gmail.tests.search_for_emails.test_search_for_emails.TestFilter object at 0x7f4d6ec158d0>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1782717705565'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ea17910>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6eb73370>, _err=<_io.StringIO object at 0x7f4d6ea2e200>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_TIMEFRAME
    )
    def test_search_message_time_filter(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"][:1])
        google_gmail.set_messages(
            MOCK_DATA["mail_without_attachments"][1:],
            set_ts_to_now=True
        )
    
        action = init_async_action(
            SearchForEmails,
            script_name=Constants.SEARCH_FOR_EMAILS_SCRIPT_NAME,
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 2
E       assert 0 == 2
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ea17910>.request_history

tests/search_for_emails/test_search_for_emails.py:327: AssertionError
tests/search_for_emails/test_search_for_emails.py::TestAsyncTimeout::test_search_timeout
self = <gmail.tests.search_for_emails.test_search_for_emails.TestAsyncTimeout object at 0x7f4d6ec25110>
google_gmail = GoogleGmail(messages={}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ebb80d0>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6ea2f130>, _err=<_io.StringIO object at 0x7f4d6ea2f010>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MESSAGE_ID
    )
    def test_search_timeout(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        action = init_async_action(
            SearchForEmails,
            script_name=Constants.SEARCH_FOR_EMAILS_SCRIPT_NAME,
            async_timeout_ms=1
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 1
E       assert 0 == 1
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ebb80d0>.request_history

tests/search_for_emails/test_search_for_emails.py:358: AssertionError
tests/send_email/test_send_email.py::TestSendEmailAuth::test_invalid_email
self = <gmail.tests.send_email.test_send_email.TestSendEmailAuth object at 0x7f4d6edb4710>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ea7ce90>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6ea2d090>, _err=<_io.StringIO object at 0x7f4d6ea2e560>)

    @set_metadata(
        integration_config=CONFIG_WITH_INVALID_EMAIL,
        parameters=ACTION_CONFIG
    )
    def test_invalid_email(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput,
    ) -> None:
        SendEmail(script_name=Constants.SEND_EMAIL_SCRIPT_NAME).run()
    
        assert len(gmail_script_session.request_history) == 0
>       assert (
            INVALID_EMAIL_OUTPUT_MESSAGE in action_output.results.output_message
        )
E       assert 'Failed to send email!\nReason: Impersonation is not allowed for the provided service account. Please check the "Service Account Token Creator" role to the service account: ' in "Failed to send email!\nReason: path '' doesn't match with any of the other 'GET' routes patterns: ['/computeMetadata/...tance/service-accounts/default/email', '/computeMetadata/v1/instance/service-accounts/\\\\w+@[a-zA-Z]+\\\\.com/token']"
E        +  where "Failed to send email!\nReason: path '' doesn't match with any of the other 'GET' routes patterns: ['/computeMetadata/...tance/service-accounts/default/email', '/computeMetadata/v1/instance/service-accounts/\\\\w+@[a-zA-Z]+\\\\.com/token']" = ActionOutput(output_message="Failed to send email!\nReason: path '' doesn't match with any of the other 'GET' routes p...]+\\\\.com/token']", result_value=False, execution_state=<ExecutionState.FAILED: 2>, json_output=None, debug_output='').output_message
E        +    where ActionOutput(output_message="Failed to send email!\nReason: path '' doesn't match with any of the other 'GET' routes p...]+\\\\.com/token']", result_value=False, execution_state=<ExecutionState.FAILED: 2>, json_output=None, debug_output='') = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6ea2d090>, _err=<_io.StringIO object at 0x7f4d6ea2e560>).results

tests/send_email/test_send_email.py:130: AssertionError
tests/send_email/test_send_email.py::TestSendEmail::test_send_email_with_mandatory_params
self = <gmail.tests.send_email.test_send_email.TestSendEmail object at 0x7f4d6edb7550>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ea5d6d0>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6ea2fac0>, _err=<_io.StringIO object at 0x7f4d6ea2f010>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG
    )
    def test_send_email_with_mandatory_params(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
        action = SendEmail(script_name=Constants.SEND_EMAIL_SCRIPT_NAME)
        action.run()
    
>       assert len(gmail_script_session.request_history) == 3
E       assert 0 == 3
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ea5d6d0>.request_history

tests/send_email/test_send_email.py:153: AssertionError
tests/send_email/test_send_email.py::TestSendEmail::test_send_email_with_all_params
self = <gmail.tests.send_email.test_send_email.TestSendEmail object at 0x7f4d6edb7a50>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ecc6290>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6eaac5e0>, _err=<_io.StringIO object at 0x7f4d6eaac790>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_ALL_PARAMS
    )
    def test_send_email_with_all_params(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
        action = SendEmail(script_name=Constants.SEND_EMAIL_SCRIPT_NAME)
        action.run()
    
>       assert len(gmail_script_session.request_history) == 3
E       assert 0 == 3
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ecc6290>.request_history

tests/send_email/test_send_email.py:176: AssertionError
tests/send_email/test_send_email.py::TestSendEmail::test_send_email_with_comma_separated_params
self = <gmail.tests.send_email.test_send_email.TestSendEmail object at 0x7f4d6edb7dd0>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ea756d0>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6eaac940>, _err=<_io.StringIO object at 0x7f4d6eaaca60>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_COMMA_SEPARATED_PARAMS
    )
    def test_send_email_with_comma_separated_params(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
        action = SendEmail(script_name=Constants.SEND_EMAIL_SCRIPT_NAME)
        action.run()
    
>       assert len(gmail_script_session.request_history) == 3
E       assert 0 == 3
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ea756d0>.request_history

tests/send_email/test_send_email.py:199: AssertionError
tests/send_email/test_send_email.py::TestSendEmail::test_send_email_with_attachments
self = <gmail.tests.send_email.test_send_email.TestSendEmail object at 0x7f4d6edb6650>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ea65050>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6eaad120>, _err=<_io.StringIO object at 0x7f4d6eaac8b0>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_ATTACHMENTS
    )
    def test_send_email_with_attachments(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
        action = SendEmail(script_name=Constants.SEND_EMAIL_SCRIPT_NAME)
        action.run()
        delete_test_attachments(ACTION_CONFIG_WITH_ATTACHMENTS["Attachments Paths"])
    
>       assert len(gmail_script_session.request_history) == 3
E       assert 0 == 3
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ea65050>.request_history

tests/send_email/test_send_email.py:223: AssertionError
tests/send_thread_reply/test_send_thread_reply.py::TestAuth::test_invalid_email
self = <gmail.tests.send_thread_reply.test_send_thread_reply.TestAuth object at 0x7f4d6ec8e7d0>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6eae8bd0>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6eaad360>, _err=<_io.StringIO object at 0x7f4d6eaacd30>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG
    )
    def test_invalid_email(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput,
    ) -> None:
        SendThreadReply(script_name=Constants.SEND_THREAD_REPLY_SCRIPT_NAME).run()
    
>       assert len(gmail_script_session.request_history) == 1
E       assert 0 == 1
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6eae8bd0>.request_history

tests/send_thread_reply/test_send_thread_reply.py:127: AssertionError
tests/send_thread_reply/test_send_thread_reply.py::TestSendEmail::test_with_no_params
self = <gmail.tests.send_thread_reply.test_send_thread_reply.TestSendEmail object at 0x7f4d6ec8dc10>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6eac3390>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6eaad090>, _err=<_io.StringIO object at 0x7f4d6eaad480>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MESSAGE_ID
    )
    def test_with_no_params(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
        action = SendThreadReply(script_name=Constants.SEND_THREAD_REPLY_SCRIPT_NAME)
        action.run()
    
>       assert len(gmail_script_session.request_history) == 4
E       assert 0 == 4
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6eac3390>.request_history

tests/send_thread_reply/test_send_thread_reply.py:152: AssertionError
tests/send_thread_reply/test_send_thread_reply.py::TestSendEmail::test_with_csv_reply_to
self = <gmail.tests.send_thread_reply.test_send_thread_reply.TestSendEmail object at 0x7f4d6ec8dad0>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ea7d6d0>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6eaae5f0>, _err=<_io.StringIO object at 0x7f4d6eaae710>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_COMMA_SEPARATED_PARAMS
    )
    def test_with_csv_reply_to(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
        action = SendThreadReply(script_name=Constants.SEND_THREAD_REPLY_SCRIPT_NAME)
        action.run()
    
>       assert len(gmail_script_session.request_history) == 4
E       assert 0 == 4
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ea7d6d0>.request_history

tests/send_thread_reply/test_send_thread_reply.py:180: AssertionError
tests/send_thread_reply/test_send_thread_reply.py::TestSendEmail::test_with_attachments
self = <gmail.tests.send_thread_reply.test_send_thread_reply.TestSendEmail object at 0x7f4d6ec8c410>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ea76910>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6eaacc10>, _err=<_io.StringIO object at 0x7f4d6eaaea70>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_ATTACHMENTS
    )
    def test_with_attachments(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
        action = SendThreadReply(script_name=Constants.SEND_THREAD_REPLY_SCRIPT_NAME)
        action.run()
        delete_test_attachments(ACTION_CONFIG_WITH_ATTACHMENTS["Attachments Paths"])
    
>       assert len(gmail_script_session.request_history) == 4
E       assert 0 == 4
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ea76910>.request_history

tests/send_thread_reply/test_send_thread_reply.py:209: AssertionError
tests/send_thread_reply/test_send_thread_reply.py::TestSendEmail::test_with_attachments_in_original_email
self = <gmail.tests.send_thread_reply.test_send_thread_reply.TestSendEmail object at 0x7f4d6ec8ef50>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...FVTOkNPTkZJUk1FRA0KU1VNTUFSWTpUZXN0IEdtYWlsDQpUUkFOU1A6T1BBUVVFDQpFTkQ6VkVWRU5UDQpFTkQ6VkNBTEVOREFSDQo='}}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6e9106d0>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6eaae440>, _err=<_io.StringIO object at 0x7f4d6eaaef80>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_EMAIL_WITH_ATTACHMENTS
    )
    def test_with_attachments_in_original_email(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(
            MOCK_DATA["mail_without_attachments"] + MOCK_DATA["mail_with_files"]
        )
        google_gmail.set_attachments(MOCK_DATA["attachments"])
        action = SendThreadReply(script_name=Constants.SEND_THREAD_REPLY_SCRIPT_NAME)
        action.run()
    
>       assert len(gmail_script_session.request_history) == 6
E       assert 0 == 6
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6e9106d0>.request_history

tests/send_thread_reply/test_send_thread_reply.py:240: AssertionError
tests/test_google_gmail_connector.py::TestTestRun::test_connector_test_run_no_mail
self = <gmail.connectors.GmailConnector.GoogleGmailConnector object at 0x7f4d6eaa0910>

    @async_output_handler
    async def start(self) -> None:
        """
        Executes the connector logic.
    
        Execution steps:
    
            1. Extracting connector script parameters from the SDK connector object
            2. Validate parameters values
            3. Loading the connector context data via the SDK connector object
            4. Initializing the integrations manager(s)
            5. Fetching & parsing alerts from the product via integration manager
            6. Filtering the alerts
            7. Processing the filtered alerts into siemplify alerts
            8. Saving connector context data via the SDK connector object
            9. Sending newly created siemplify alerts to the platform
    
        Raises:
            ConnectorSetupError: if any of the pre-processing phases fail
        """
        self.logger.info(
            f'---------------- Starting connector {self.script_name} '
            'execution ----------------'
        )
        if self.is_test_run:
            self.logger.info(
                '****** This is an \"IDE Play Button\"\\\"Run Connector once\" '
                'test run ******'
            )
    
        self.logger.info(
            '------------------- Main - Param Init -------------------'
        )
        self.extract_params()
        self.logger.info(
            '------------------- Main - Started -------------------'
        )
        processed_alerts = []
    
        try:
            try:
                self.validate_params_wrapper()
                self.read_context_wrapper()
                self.logger.info('Initializing managers...')
>               self.init_managers()

.venv/lib/python3.11/site-packages/TIPCommon/base/connector/async_connector.py:537: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
connectors/GmailConnector.py:93: in init_managers
    auth_manager = build_auth_manager(
core/GoogleGmailAuth.py:90: in build_auth_manager
    return GoogleGmailAuthManager(
core/GoogleGmailAuth.py:112: in __init__
    self.credentials = build_workspace_credentials(
core/GoogleGmailUtils.py:355: in build_workspace_credentials
    adc_creds = get_adc()[0]
                ^^^^^^^^^
.venv/lib/python3.11/site-packages/TIPCommon/rest/auth.py:158: in get_adc
    return google.auth.default(scopes, request, quota_project_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/_default.py:714: in default
    credentials, project_id = checker()
                              ^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/_default.py:710: in <lambda>
    lambda: _get_gce_credentials(request, quota_project_id=quota_project_id),
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/_default.py:406: in _get_gce_credentials
    if _metadata.is_on_gce(request=request):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/compute_engine/_metadata.py:138: in is_on_gce
    if ping(request):
       ^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/compute_engine/_metadata.py:221: in ping
    response = request(
.venv/lib/python3.11/site-packages/google/auth/transport/requests.py:188: in __call__
    response = self.session.request(
tests/conftest.py:214: in mock_session_request
    return session.request(method, url, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/integration_testing/requests/session.py:89: in request
    response: MockResponse = self._do_request(method, request)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/integration_testing/requests/session.py:125: in _do_request
    self._validate_response(response, method, path)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <gmail.tests.core.session.GoogleGmailSession object at 0x7f4d6eaa06d0>
response = <object object at 0x7f4d73f859a0>, method = 'GET', path = ''

    def _validate_response(
        self,
        response: Response,
        method: str,
        path: str,
    ) -> None:
        msg: str
        if response is None or response is NotImplemented:
            msg = (
                "Null or UnImplemented Response!"
                f" Request with method '{method}' to URL '{path}'"
                f" returned {response!r} instead of a response object."
                " Perhaps you forgot to return a response object in the correlating"
                " router."
            )
            raise RuntimeError(msg)
    
        if response is NO_RESPONSE:
            msg = (
                f"path '{path}' doesn't match with any of the other '{method}' "
                f"routes patterns: {list(self.routes[method].keys())}"
            )
>           raise ValueError(msg)
E           ValueError: path '' doesn't match with any of the other 'GET' routes patterns: ['/computeMetadata/v1/instance/service-accounts/default/', '/computeMetadata/v1/instance/service-accounts/default/email', '/computeMetadata/v1/instance/service-accounts/\\w+@[a-zA-Z]+\\.com/token']

.venv/lib/python3.11/site-packages/integration_testing/requests/session.py:150: ValueError

The above exception was the direct cause of the following exception:

self = <gmail.tests.test_google_gmail_connector.TestTestRun object at 0x7f4d6ec75d90>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6eaf2390>
connector_output = <integration_testing.platform.script_output.MockConnectorOutput object at 0x7f4d6fec8670>

    @set_metadata(
            connector_def_file_path=DEF_PATH,
            parameters=DEFAULT_PARAMETERS
    )
    def test_connector_test_run_no_mail(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            connector_output: MockConnectorOutput,
    ) -> None:
        set_is_test_run_to_true()
    
        loop = asyncio.get_event_loop()
>       loop.run_until_complete(main())

tests/test_google_gmail_connector.py:88: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/asyncio/base_events.py:654: in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
connectors/GmailConnector.py:532: in main
    await asyncio.ensure_future(connector.start())
.venv/lib/python3.11/site-packages/TIPCommon/base/utils.py:152: in wrapper
    return await func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <gmail.connectors.GmailConnector.GoogleGmailConnector object at 0x7f4d6eaa0910>

    @async_output_handler
    async def start(self) -> None:
        """
        Executes the connector logic.
    
        Execution steps:
    
            1. Extracting connector script parameters from the SDK connector object
            2. Validate parameters values
            3. Loading the connector context data via the SDK connector object
            4. Initializing the integrations manager(s)
            5. Fetching & parsing alerts from the product via integration manager
            6. Filtering the alerts
            7. Processing the filtered alerts into siemplify alerts
            8. Saving connector context data via the SDK connector object
            9. Sending newly created siemplify alerts to the platform
    
        Raises:
            ConnectorSetupError: if any of the pre-processing phases fail
        """
        self.logger.info(
            f'---------------- Starting connector {self.script_name} '
            'execution ----------------'
        )
        if self.is_test_run:
            self.logger.info(
                '****** This is an \"IDE Play Button\"\\\"Run Connector once\" '
                'test run ******'
            )
    
        self.logger.info(
            '------------------- Main - Param Init -------------------'
        )
        self.extract_params()
        self.logger.info(
            '------------------- Main - Started -------------------'
        )
        processed_alerts = []
    
        try:
            try:
                self.validate_params_wrapper()
                self.read_context_wrapper()
                self.logger.info('Initializing managers...')
                self.init_managers()
            except Exception as e:
>               raise ConnectorSetupError(e) from e
E               TIPCommon.exceptions.ConnectorSetupError: path '' doesn't match with any of the other 'GET' routes patterns: ['/computeMetadata/v1/instance/service-accounts/default/', '/computeMetadata/v1/instance/service-accounts/default/email', '/computeMetadata/v1/instance/service-accounts/\\w+@[a-zA-Z]+\\.com/token']

.venv/lib/python3.11/site-packages/TIPCommon/base/connector/async_connector.py:539: ConnectorSetupError
tests/test_google_gmail_connector.py::TestTestRun::test_connector_test_run_with_mail
self = <gmail.connectors.GmailConnector.GoogleGmailConnector object at 0x7f4d6e667390>

    @async_output_handler
    async def start(self) -> None:
        """
        Executes the connector logic.
    
        Execution steps:
    
            1. Extracting connector script parameters from the SDK connector object
            2. Validate parameters values
            3. Loading the connector context data via the SDK connector object
            4. Initializing the integrations manager(s)
            5. Fetching & parsing alerts from the product via integration manager
            6. Filtering the alerts
            7. Processing the filtered alerts into siemplify alerts
            8. Saving connector context data via the SDK connector object
            9. Sending newly created siemplify alerts to the platform
    
        Raises:
            ConnectorSetupError: if any of the pre-processing phases fail
        """
        self.logger.info(
            f'---------------- Starting connector {self.script_name} '
            'execution ----------------'
        )
        if self.is_test_run:
            self.logger.info(
                '****** This is an \"IDE Play Button\"\\\"Run Connector once\" '
                'test run ******'
            )
    
        self.logger.info(
            '------------------- Main - Param Init -------------------'
        )
        self.extract_params()
        self.logger.info(
            '------------------- Main - Started -------------------'
        )
        processed_alerts = []
    
        try:
            try:
                self.validate_params_wrapper()
                self.read_context_wrapper()
                self.logger.info('Initializing managers...')
>               self.init_managers()

.venv/lib/python3.11/site-packages/TIPCommon/base/connector/async_connector.py:537: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
connectors/GmailConnector.py:93: in init_managers
    auth_manager = build_auth_manager(
core/GoogleGmailAuth.py:90: in build_auth_manager
    return GoogleGmailAuthManager(
core/GoogleGmailAuth.py:112: in __init__
    self.credentials = build_workspace_credentials(
core/GoogleGmailUtils.py:355: in build_workspace_credentials
    adc_creds = get_adc()[0]
                ^^^^^^^^^
.venv/lib/python3.11/site-packages/TIPCommon/rest/auth.py:158: in get_adc
    return google.auth.default(scopes, request, quota_project_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/_default.py:714: in default
    credentials, project_id = checker()
                              ^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/_default.py:710: in <lambda>
    lambda: _get_gce_credentials(request, quota_project_id=quota_project_id),
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/_default.py:406: in _get_gce_credentials
    if _metadata.is_on_gce(request=request):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/compute_engine/_metadata.py:138: in is_on_gce
    if ping(request):
       ^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/compute_engine/_metadata.py:221: in ping
    response = request(
.venv/lib/python3.11/site-packages/google/auth/transport/requests.py:188: in __call__
    response = self.session.request(
tests/conftest.py:214: in mock_session_request
    return session.request(method, url, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/integration_testing/requests/session.py:89: in request
    response: MockResponse = self._do_request(method, request)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/integration_testing/requests/session.py:125: in _do_request
    self._validate_response(response, method, path)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <gmail.tests.core.session.GoogleGmailSession object at 0x7f4d6e6ea450>
response = <object object at 0x7f4d73f859a0>, method = 'GET', path = ''

    def _validate_response(
        self,
        response: Response,
        method: str,
        path: str,
    ) -> None:
        msg: str
        if response is None or response is NotImplemented:
            msg = (
                "Null or UnImplemented Response!"
                f" Request with method '{method}' to URL '{path}'"
                f" returned {response!r} instead of a response object."
                " Perhaps you forgot to return a response object in the correlating"
                " router."
            )
            raise RuntimeError(msg)
    
        if response is NO_RESPONSE:
            msg = (
                f"path '{path}' doesn't match with any of the other '{method}' "
                f"routes patterns: {list(self.routes[method].keys())}"
            )
>           raise ValueError(msg)
E           ValueError: path '' doesn't match with any of the other 'GET' routes patterns: ['/computeMetadata/v1/instance/service-accounts/default/', '/computeMetadata/v1/instance/service-accounts/default/email', '/computeMetadata/v1/instance/service-accounts/\\w+@[a-zA-Z]+\\.com/token']

.venv/lib/python3.11/site-packages/integration_testing/requests/session.py:150: ValueError

The above exception was the direct cause of the following exception:

self = <gmail.tests.test_google_gmail_connector.TestTestRun object at 0x7f4d6ec75250>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6e6ead10>
connector_output = <integration_testing.platform.script_output.MockConnectorOutput object at 0x7f4d6e54dde0>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1782717705612'}}, attachments={}, threads={})

    @set_metadata(
            connector_def_file_path=DEF_PATH,
            parameters=DEFAULT_PARAMETERS,
    )
    def test_connector_test_run_with_mail(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            connector_output: MockConnectorOutput,
            google_gmail: GoogleGmail,
    ) -> None:
        google_gmail.set_messages(
            MOCK_DATA["mail_without_attachments"],
            set_ts_to_now=True
        )
        set_is_test_run_to_true()
    
        loop = asyncio.get_event_loop()
>       loop.run_until_complete(main())

tests/test_google_gmail_connector.py:112: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/asyncio/base_events.py:654: in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
connectors/GmailConnector.py:532: in main
    await asyncio.ensure_future(connector.start())
.venv/lib/python3.11/site-packages/TIPCommon/base/utils.py:152: in wrapper
    return await func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <gmail.connectors.GmailConnector.GoogleGmailConnector object at 0x7f4d6e667390>

    @async_output_handler
    async def start(self) -> None:
        """
        Executes the connector logic.
    
        Execution steps:
    
            1. Extracting connector script parameters from the SDK connector object
            2. Validate parameters values
            3. Loading the connector context data via the SDK connector object
            4. Initializing the integrations manager(s)
            5. Fetching & parsing alerts from the product via integration manager
            6. Filtering the alerts
            7. Processing the filtered alerts into siemplify alerts
            8. Saving connector context data via the SDK connector object
            9. Sending newly created siemplify alerts to the platform
    
        Raises:
            ConnectorSetupError: if any of the pre-processing phases fail
        """
        self.logger.info(
            f'---------------- Starting connector {self.script_name} '
            'execution ----------------'
        )
        if self.is_test_run:
            self.logger.info(
                '****** This is an \"IDE Play Button\"\\\"Run Connector once\" '
                'test run ******'
            )
    
        self.logger.info(
            '------------------- Main - Param Init -------------------'
        )
        self.extract_params()
        self.logger.info(
            '------------------- Main - Started -------------------'
        )
        processed_alerts = []
    
        try:
            try:
                self.validate_params_wrapper()
                self.read_context_wrapper()
                self.logger.info('Initializing managers...')
                self.init_managers()
            except Exception as e:
>               raise ConnectorSetupError(e) from e
E               TIPCommon.exceptions.ConnectorSetupError: path '' doesn't match with any of the other 'GET' routes patterns: ['/computeMetadata/v1/instance/service-accounts/default/', '/computeMetadata/v1/instance/service-accounts/default/email', '/computeMetadata/v1/instance/service-accounts/\\w+@[a-zA-Z]+\\.com/token']

.venv/lib/python3.11/site-packages/TIPCommon/base/connector/async_connector.py:539: ConnectorSetupError
tests/test_google_gmail_connector.py::TestTestRun::test_connector_test_run_with_mail_no_context
self = <gmail.connectors.GmailConnector.GoogleGmailConnector object at 0x7f4d6e4f0110>

    @async_output_handler
    async def start(self) -> None:
        """
        Executes the connector logic.
    
        Execution steps:
    
            1. Extracting connector script parameters from the SDK connector object
            2. Validate parameters values
            3. Loading the connector context data via the SDK connector object
            4. Initializing the integrations manager(s)
            5. Fetching & parsing alerts from the product via integration manager
            6. Filtering the alerts
            7. Processing the filtered alerts into siemplify alerts
            8. Saving connector context data via the SDK connector object
            9. Sending newly created siemplify alerts to the platform
    
        Raises:
            ConnectorSetupError: if any of the pre-processing phases fail
        """
        self.logger.info(
            f'---------------- Starting connector {self.script_name} '
            'execution ----------------'
        )
        if self.is_test_run:
            self.logger.info(
                '****** This is an \"IDE Play Button\"\\\"Run Connector once\" '
                'test run ******'
            )
    
        self.logger.info(
            '------------------- Main - Param Init -------------------'
        )
        self.extract_params()
        self.logger.info(
            '------------------- Main - Started -------------------'
        )
        processed_alerts = []
    
        try:
            try:
                self.validate_params_wrapper()
                self.read_context_wrapper()
                self.logger.info('Initializing managers...')
>               self.init_managers()

.venv/lib/python3.11/site-packages/TIPCommon/base/connector/async_connector.py:537: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
connectors/GmailConnector.py:93: in init_managers
    auth_manager = build_auth_manager(
core/GoogleGmailAuth.py:90: in build_auth_manager
    return GoogleGmailAuthManager(
core/GoogleGmailAuth.py:112: in __init__
    self.credentials = build_workspace_credentials(
core/GoogleGmailUtils.py:355: in build_workspace_credentials
    adc_creds = get_adc()[0]
                ^^^^^^^^^
.venv/lib/python3.11/site-packages/TIPCommon/rest/auth.py:158: in get_adc
    return google.auth.default(scopes, request, quota_project_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/_default.py:714: in default
    credentials, project_id = checker()
                              ^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/_default.py:710: in <lambda>
    lambda: _get_gce_credentials(request, quota_project_id=quota_project_id),
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/_default.py:406: in _get_gce_credentials
    if _metadata.is_on_gce(request=request):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/compute_engine/_metadata.py:138: in is_on_gce
    if ping(request):
       ^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/compute_engine/_metadata.py:221: in ping
    response = request(
.venv/lib/python3.11/site-packages/google/auth/transport/requests.py:188: in __call__
    response = self.session.request(
tests/conftest.py:214: in mock_session_request
    return session.request(method, url, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/integration_testing/requests/session.py:89: in request
    response: MockResponse = self._do_request(method, request)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/integration_testing/requests/session.py:125: in _do_request
    self._validate_response(response, method, path)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <gmail.tests.core.session.GoogleGmailSession object at 0x7f4d6e4114d0>
response = <object object at 0x7f4d73f859a0>, method = 'GET', path = ''

    def _validate_response(
        self,
        response: Response,
        method: str,
        path: str,
    ) -> None:
        msg: str
        if response is None or response is NotImplemented:
            msg = (
                "Null or UnImplemented Response!"
                f" Request with method '{method}' to URL '{path}'"
                f" returned {response!r} instead of a response object."
                " Perhaps you forgot to return a response object in the correlating"
                " router."
            )
            raise RuntimeError(msg)
    
        if response is NO_RESPONSE:
            msg = (
                f"path '{path}' doesn't match with any of the other '{method}' "
                f"routes patterns: {list(self.routes[method].keys())}"
            )
>           raise ValueError(msg)
E           ValueError: path '' doesn't match with any of the other 'GET' routes patterns: ['/computeMetadata/v1/instance/service-accounts/default/', '/computeMetadata/v1/instance/service-accounts/default/email', '/computeMetadata/v1/instance/service-accounts/\\w+@[a-zA-Z]+\\.com/token']

.venv/lib/python3.11/site-packages/integration_testing/requests/session.py:150: ValueError

The above exception was the direct cause of the following exception:

self = <gmail.tests.test_google_gmail_connector.TestTestRun object at 0x7f4d6ec77e10>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6e410210>
connector_output = <integration_testing.platform.script_output.MockConnectorOutput object at 0x7f4d6e71b520>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1782717705714'}}, attachments={}, threads={})
external_context = MockExternalContext(_rows={})

    @set_metadata(
        connector_def_file_path=DEF_PATH,
        parameters=DEFAULT_PARAMETERS,
        external_context=MockExternalContext(),
    )
    def test_connector_test_run_with_mail_no_context(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            connector_output: MockConnectorOutput,
            google_gmail: GoogleGmail,
            external_context: MockExternalContext,
    ) -> None:
        google_gmail.set_messages(
            MOCK_DATA["mail_without_attachments"],
            set_ts_to_now=True
        )
        set_is_test_run_to_true()
    
        loop = asyncio.get_event_loop()
>       loop.run_until_complete(main())

tests/test_google_gmail_connector.py:138: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/asyncio/base_events.py:654: in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
connectors/GmailConnector.py:532: in main
    await asyncio.ensure_future(connector.start())
.venv/lib/python3.11/site-packages/TIPCommon/base/utils.py:152: in wrapper
    return await func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <gmail.connectors.GmailConnector.GoogleGmailConnector object at 0x7f4d6e4f0110>

    @async_output_handler
    async def start(self) -> None:
        """
        Executes the connector logic.
    
        Execution steps:
    
            1. Extracting connector script parameters from the SDK connector object
            2. Validate parameters values
            3. Loading the connector context data via the SDK connector object
            4. Initializing the integrations manager(s)
            5. Fetching & parsing alerts from the product via integration manager
            6. Filtering the alerts
            7. Processing the filtered alerts into siemplify alerts
            8. Saving connector context data via the SDK connector object
            9. Sending newly created siemplify alerts to the platform
    
        Raises:
            ConnectorSetupError: if any of the pre-processing phases fail
        """
        self.logger.info(
            f'---------------- Starting connector {self.script_name} '
            'execution ----------------'
        )
        if self.is_test_run:
            self.logger.info(
                '****** This is an \"IDE Play Button\"\\\"Run Connector once\" '
                'test run ******'
            )
    
        self.logger.info(
            '------------------- Main - Param Init -------------------'
        )
        self.extract_params()
        self.logger.info(
            '------------------- Main - Started -------------------'
        )
        processed_alerts = []
    
        try:
            try:
                self.validate_params_wrapper()
                self.read_context_wrapper()
                self.logger.info('Initializing managers...')
                self.init_managers()
            except Exception as e:
>               raise ConnectorSetupError(e) from e
E               TIPCommon.exceptions.ConnectorSetupError: path '' doesn't match with any of the other 'GET' routes patterns: ['/computeMetadata/v1/instance/service-accounts/default/', '/computeMetadata/v1/instance/service-accounts/default/email', '/computeMetadata/v1/instance/service-accounts/\\w+@[a-zA-Z]+\\.com/token']

.venv/lib/python3.11/site-packages/TIPCommon/base/connector/async_connector.py:539: ConnectorSetupError
tests/test_google_gmail_connector.py::TestConnectorExternalContext::test_connector_test_run_with_mail_ids
self = <gmail.tests.test_google_gmail_connector.TestConnectorExternalContext object at 0x7f4d6ec77a50>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ea069d0>
connector_output = <integration_testing.platform.script_output.MockConnectorOutput object at 0x7f4d6e7671c0>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1782717706244'}}, attachments={}, threads={})
external_context = MockExternalContext(_rows={})

    @set_metadata(
        connector_def_file_path=DEF_PATH,
        parameters=DEFAULT_PARAMETERS,
        external_context=MockExternalContext(),
    )
    def test_connector_test_run_with_mail_ids(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            connector_output: MockConnectorOutput,
            google_gmail: GoogleGmail,
            external_context: MockExternalContext,
    ) -> None:
        google_gmail.set_messages(
            MOCK_DATA["mail_without_attachments"],
            set_ts_to_now=True
        )
    
        loop = asyncio.get_event_loop()
        loop.run_until_complete(main())
    
>       assert_list_labels(gmail_script_session.request_history, index=1)

tests/test_google_gmail_connector.py:175: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/utils.py:149: in assert_list_labels
    history_records.assert_url_path_with_regex(
.venv/lib/python3.11/site-packages/integration_testing/aiohttp/session.py:74: in assert_url_path_with_regex
    if not all(re.search(regex_pattern, hr.request.url.path) for hr in self[start:stop]):
                                                                       ^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/integration_testing/aiohttp/session.py:61: in __getitem__
    result: slice | HistoryRecordsList = super().__getitem__(item)
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/collections/__init__.py:1241: in __getitem__
    return self.__class__(self.data[i])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <[AttributeError("'HistoryRecordsList' object has no attribute 'data'") raised in repr()] HistoryRecordsList object at 0x7f4d6f5ffe90>
history_records = ([],)

    def __init__(self, *history_records: HistoryRecord) -> None:
        if not all(isinstance(el, HistoryRecord) for el in history_records):
            msg: str = "List items must be of type HistoryRecord"
>           raise TypeError(msg)
E           TypeError: List items must be of type HistoryRecord

.venv/lib/python3.11/site-packages/integration_testing/aiohttp/session.py:50: TypeError
tests/test_google_gmail_connector.py::TestConnectorExternalContext::test_connector_test_run_with_mail_timestamp
self = <gmail.tests.test_google_gmail_connector.TestConnectorExternalContext object at 0x7f4d6ec774d0>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ea11210>
connector_output = <integration_testing.platform.script_output.MockConnectorOutput object at 0x7f4d6e55aaa0>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1782717706450'}}, attachments={}, threads={})
external_context = MockExternalContext(_rows={})

    @set_metadata(
        connector_def_file_path=DEF_PATH,
        parameters=DEFAULT_PARAMETERS,
        external_context=MockExternalContext(),
    )
    def test_connector_test_run_with_mail_timestamp(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            connector_output: MockConnectorOutput,
            google_gmail: GoogleGmail,
            external_context: MockExternalContext,
    ) -> None:
        google_gmail.set_messages(
            MOCK_DATA["mail_without_attachments"],
            set_ts_to_now=True
        )
    
        loop = asyncio.get_event_loop()
        loop.run_until_complete(main())
    
>       assert_list_labels(gmail_script_session.request_history, index=1)

tests/test_google_gmail_connector.py:210: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/utils.py:149: in assert_list_labels
    history_records.assert_url_path_with_regex(
.venv/lib/python3.11/site-packages/integration_testing/aiohttp/session.py:74: in assert_url_path_with_regex
    if not all(re.search(regex_pattern, hr.request.url.path) for hr in self[start:stop]):
                                                                       ^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/integration_testing/aiohttp/session.py:61: in __getitem__
    result: slice | HistoryRecordsList = super().__getitem__(item)
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/collections/__init__.py:1241: in __getitem__
    return self.__class__(self.data[i])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <[AttributeError("'HistoryRecordsList' object has no attribute 'data'") raised in repr()] HistoryRecordsList object at 0x7f4d6eb63550>
history_records = ([],)

    def __init__(self, *history_records: HistoryRecord) -> None:
        if not all(isinstance(el, HistoryRecord) for el in history_records):
            msg: str = "List items must be of type HistoryRecord"
>           raise TypeError(msg)
E           TypeError: List items must be of type HistoryRecord

.venv/lib/python3.11/site-packages/integration_testing/aiohttp/session.py:50: TypeError
tests/test_google_gmail_connector.py::TestConnectorWithAttachments::test_connector_test_run_with_attach_eml
self = <gmail.tests.test_google_gmail_connector.TestConnectorWithAttachments object at 0x7f4d6ecd33d0>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ebd4210>
connector_output = <integration_testing.platform.script_output.MockConnectorOutput object at 0x7f4d70434f40>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1782717706628'}}, attachments={}, threads={})
external_context = MockExternalContext(_rows={})

    @set_metadata(
        connector_def_file_path=DEF_PATH,
        parameters=PARAMETERS_ATTACH_EML,
        external_context=MockExternalContext(),
    )
    def test_connector_test_run_with_attach_eml(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            connector_output: MockConnectorOutput,
            google_gmail: GoogleGmail,
            external_context: MockExternalContext,
    ) -> None:
        google_gmail.set_messages(
            MOCK_DATA["mail_without_attachments"],
            set_ts_to_now=True
        )
    
        loop = asyncio.get_event_loop()
        loop.run_until_complete(main())
    
>       assert_list_labels(gmail_script_session.request_history, index=1)

tests/test_google_gmail_connector.py:251: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/utils.py:149: in assert_list_labels
    history_records.assert_url_path_with_regex(
.venv/lib/python3.11/site-packages/integration_testing/aiohttp/session.py:74: in assert_url_path_with_regex
    if not all(re.search(regex_pattern, hr.request.url.path) for hr in self[start:stop]):
                                                                       ^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/integration_testing/aiohttp/session.py:61: in __getitem__
    result: slice | HistoryRecordsList = super().__getitem__(item)
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/collections/__init__.py:1241: in __getitem__
    return self.__class__(self.data[i])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <[AttributeError("'HistoryRecordsList' object has no attribute 'data'") raised in repr()] HistoryRecordsList object at 0x7f4d6ec23e50>
history_records = ([],)

    def __init__(self, *history_records: HistoryRecord) -> None:
        if not all(isinstance(el, HistoryRecord) for el in history_records):
            msg: str = "List items must be of type HistoryRecord"
>           raise TypeError(msg)
E           TypeError: List items must be of type HistoryRecord

.venv/lib/python3.11/site-packages/integration_testing/aiohttp/session.py:50: TypeError
tests/test_google_gmail_connector.py::TestConnectorWithAttachments::test_connector_test_run_with_eml_single_alert
self = <gmail.tests.test_google_gmail_connector.TestConnectorWithAttachments object at 0x7f4d6ecd1b10>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ea53dd0>
connector_output = <integration_testing.platform.script_output.MockConnectorOutput object at 0x7f4d6e5199f0>
google_gmail = GoogleGmail(messages={'190e8e97b4564924': {'id': '190e8e97b4564924', 'threadId': '190e8e97b4564924', 'labelIds': ['UNR...FVTOkNPTkZJUk1FRA0KU1VNTUFSWTpUZXN0IEdtYWlsDQpUUkFOU1A6T1BBUVVFDQpFTkQ6VkVWRU5UDQpFTkQ6VkNBTEVOREFSDQo='}}, threads={})
external_context = MockExternalContext(_rows={})

    @set_metadata(
        connector_def_file_path=DEF_PATH,
        parameters=DEFAULT_PARAMETERS,
        external_context=MockExternalContext(),
    )
    def test_connector_test_run_with_eml_single_alert(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            connector_output: MockConnectorOutput,
            google_gmail: GoogleGmail,
            external_context: MockExternalContext,
    ) -> None:
        google_gmail.set_messages(
            MOCK_DATA["mail_with_eml"],
            set_ts_to_now=True
        )
        google_gmail.set_attachments(MOCK_DATA["attachments"])
    
        loop = asyncio.get_event_loop()
        loop.run_until_complete(main())
    
>       assert_list_labels(gmail_script_session.request_history, index=1)

tests/test_google_gmail_connector.py:291: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/utils.py:149: in assert_list_labels
    history_records.assert_url_path_with_regex(
.venv/lib/python3.11/site-packages/integration_testing/aiohttp/session.py:74: in assert_url_path_with_regex
    if not all(re.search(regex_pattern, hr.request.url.path) for hr in self[start:stop]):
                                                                       ^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/integration_testing/aiohttp/session.py:61: in __getitem__
    result: slice | HistoryRecordsList = super().__getitem__(item)
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/collections/__init__.py:1241: in __getitem__
    return self.__class__(self.data[i])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <[AttributeError("'HistoryRecordsList' object has no attribute 'data'") raised in repr()] HistoryRecordsList object at 0x7f4d6eac73d0>
history_records = ([],)

    def __init__(self, *history_records: HistoryRecord) -> None:
        if not all(isinstance(el, HistoryRecord) for el in history_records):
            msg: str = "List items must be of type HistoryRecord"
>           raise TypeError(msg)
E           TypeError: List items must be of type HistoryRecord

.venv/lib/python3.11/site-packages/integration_testing/aiohttp/session.py:50: TypeError
tests/test_google_gmail_connector.py::TestConnectorWithAttachments::test_connector_test_run_with_eml_multiple_alerts
self = <gmail.tests.test_google_gmail_connector.TestConnectorWithAttachments object at 0x7f4d6ecd1710>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ea0f350>
connector_output = <integration_testing.platform.script_output.MockConnectorOutput object at 0x7f4d6f580490>
google_gmail = GoogleGmail(messages={'190e8e97b4564924': {'id': '190e8e97b4564924', 'threadId': '190e8e97b4564924', 'labelIds': ['UNR...FVTOkNPTkZJUk1FRA0KU1VNTUFSWTpUZXN0IEdtYWlsDQpUUkFOU1A6T1BBUVVFDQpFTkQ6VkVWRU5UDQpFTkQ6VkNBTEVOREFSDQo='}}, threads={})
external_context = MockExternalContext(_rows={})

    @set_metadata(
        connector_def_file_path=DEF_PATH,
        parameters=PARAMETERS_WITH_MULTIPLE_ALERTS_MODE,
        external_context=MockExternalContext(),
    )
    def test_connector_test_run_with_eml_multiple_alerts(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            connector_output: MockConnectorOutput,
            google_gmail: GoogleGmail,
            external_context: MockExternalContext,
    ) -> None:
        google_gmail.set_messages(
            MOCK_DATA["mail_with_eml"],
            set_ts_to_now=True
        )
        google_gmail.set_attachments(MOCK_DATA["attachments"])
    
        loop = asyncio.get_event_loop()
        loop.run_until_complete(main())
    
>       assert_list_labels(gmail_script_session.request_history, index=1)

tests/test_google_gmail_connector.py:332: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/utils.py:149: in assert_list_labels
    history_records.assert_url_path_with_regex(
.venv/lib/python3.11/site-packages/integration_testing/aiohttp/session.py:74: in assert_url_path_with_regex
    if not all(re.search(regex_pattern, hr.request.url.path) for hr in self[start:stop]):
                                                                       ^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/integration_testing/aiohttp/session.py:61: in __getitem__
    result: slice | HistoryRecordsList = super().__getitem__(item)
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/collections/__init__.py:1241: in __getitem__
    return self.__class__(self.data[i])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <[AttributeError("'HistoryRecordsList' object has no attribute 'data'") raised in repr()] HistoryRecordsList object at 0x7f4d6e71fc10>
history_records = ([],)

    def __init__(self, *history_records: HistoryRecord) -> None:
        if not all(isinstance(el, HistoryRecord) for el in history_records):
            msg: str = "List items must be of type HistoryRecord"
>           raise TypeError(msg)
E           TypeError: List items must be of type HistoryRecord

.venv/lib/python3.11/site-packages/integration_testing/aiohttp/session.py:50: TypeError
tests/test_google_gmail_connector.py::TestConnectorWithAttachments::test_connector_test_run_with_attachments
self = <gmail.tests.test_google_gmail_connector.TestConnectorWithAttachments object at 0x7f4d6eee0050>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6e714410>
connector_output = <integration_testing.platform.script_output.MockConnectorOutput object at 0x7f4d6e718be0>
google_gmail = GoogleGmail(messages={'190ee8f88c8a5f34': {'id': '190ee8f88c8a5f34', 'threadId': '190ee8f88c8a5f34', 'labelIds': ['CAT...FVTOkNPTkZJUk1FRA0KU1VNTUFSWTpUZXN0IEdtYWlsDQpUUkFOU1A6T1BBUVVFDQpFTkQ6VkVWRU5UDQpFTkQ6VkNBTEVOREFSDQo='}}, threads={})
external_context = MockExternalContext(_rows={})

    @set_metadata(
        connector_def_file_path=DEF_PATH,
        parameters=PARAMETERS_WITH_MULTIPLE_ALERTS_MODE,
        external_context=MockExternalContext(),
    )
    def test_connector_test_run_with_attachments(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            connector_output: MockConnectorOutput,
            google_gmail: GoogleGmail,
            external_context: MockExternalContext,
    ) -> None:
        google_gmail.set_messages(
            MOCK_DATA["mail_with_files"],
            set_ts_to_now=True
        )
        google_gmail.set_attachments(MOCK_DATA["attachments"])
    
        loop = asyncio.get_event_loop()
        loop.run_until_complete(main())
    
>       assert_list_labels(gmail_script_session.request_history, index=1)

tests/test_google_gmail_connector.py:374: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/utils.py:149: in assert_list_labels
    history_records.assert_url_path_with_regex(
.venv/lib/python3.11/site-packages/integration_testing/aiohttp/session.py:74: in assert_url_path_with_regex
    if not all(re.search(regex_pattern, hr.request.url.path) for hr in self[start:stop]):
                                                                       ^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/integration_testing/aiohttp/session.py:61: in __getitem__
    result: slice | HistoryRecordsList = super().__getitem__(item)
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/collections/__init__.py:1241: in __getitem__
    return self.__class__(self.data[i])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <[AttributeError("'HistoryRecordsList' object has no attribute 'data'") raised in repr()] HistoryRecordsList object at 0x7f4d6ed10b10>
history_records = ([],)

    def __init__(self, *history_records: HistoryRecord) -> None:
        if not all(isinstance(el, HistoryRecord) for el in history_records):
            msg: str = "List items must be of type HistoryRecord"
>           raise TypeError(msg)
E           TypeError: List items must be of type HistoryRecord

.venv/lib/python3.11/site-packages/integration_testing/aiohttp/session.py:50: TypeError
tests/test_google_gmail_connector.py::TestConnectorApiError::test_connector_api_error
self = <gmail.tests.test_google_gmail_connector.TestConnectorApiError object at 0x7f4d6eee0090>
google_gmail = GoogleGmail(messages={}, attachments={}, threads={})
mocker = <pytest_mock.plugin.MockerFixture object at 0x7f4d6ea17150>

    @set_metadata(
        connector_def_file_path=DEF_PATH,
        parameters=DEFAULT_PARAMETERS,
    )
    def test_connector_api_error(
            self,
            google_gmail: GoogleGmail,
            mocker,
    ) -> None:
        """Connector propagates an API error raised during get_alerts.
    
        When the Gmail labels API call fails (e.g. due to an auth or network
        issue), the exception must propagate to the caller in test-run mode.
        """
        set_is_test_run_to_true()
    
        # ISSUE FINDER: list_labels is called inside get_alerts (not init_managers),
        # so the exception is caught by the outer handler and re-raised only in
        # test-run mode. In a production run the error would be silently logged.
        mocker.patch.object(
            google_gmail,
            "list_labels",
            side_effect=Exception("Simulated API error"),
        )
    
        loop = asyncio.get_event_loop()
>       with pytest.raises(Exception, match="Simulated API error"):
E       AssertionError: Regex pattern did not match.
E         Expected regex: 'Simulated API error'
E         Actual message: "path '' doesn't match with any of the other 'GET' routes patterns: ['/computeMetadata/v1/instance/service-accounts/default/', '/computeMetadata/v1/instance/service-accounts/default/email', '/computeMetadata/v1/instance/service-accounts/\\\\w+@[a-zA-Z]+\\\\.com/token']"

tests/test_google_gmail_connector.py:425: AssertionError
tests/test_google_gmail_connector.py::TestEmailStatusFilter::test_connector_unread_filter
self = <gmail.connectors.GmailConnector.GoogleGmailConnector object at 0x7f4d6ed9f5d0>

    @async_output_handler
    async def start(self) -> None:
        """
        Executes the connector logic.
    
        Execution steps:
    
            1. Extracting connector script parameters from the SDK connector object
            2. Validate parameters values
            3. Loading the connector context data via the SDK connector object
            4. Initializing the integrations manager(s)
            5. Fetching & parsing alerts from the product via integration manager
            6. Filtering the alerts
            7. Processing the filtered alerts into siemplify alerts
            8. Saving connector context data via the SDK connector object
            9. Sending newly created siemplify alerts to the platform
    
        Raises:
            ConnectorSetupError: if any of the pre-processing phases fail
        """
        self.logger.info(
            f'---------------- Starting connector {self.script_name} '
            'execution ----------------'
        )
        if self.is_test_run:
            self.logger.info(
                '****** This is an \"IDE Play Button\"\\\"Run Connector once\" '
                'test run ******'
            )
    
        self.logger.info(
            '------------------- Main - Param Init -------------------'
        )
        self.extract_params()
        self.logger.info(
            '------------------- Main - Started -------------------'
        )
        processed_alerts = []
    
        try:
            try:
                self.validate_params_wrapper()
                self.read_context_wrapper()
                self.logger.info('Initializing managers...')
>               self.init_managers()

.venv/lib/python3.11/site-packages/TIPCommon/base/connector/async_connector.py:537: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
connectors/GmailConnector.py:93: in init_managers
    auth_manager = build_auth_manager(
core/GoogleGmailAuth.py:90: in build_auth_manager
    return GoogleGmailAuthManager(
core/GoogleGmailAuth.py:112: in __init__
    self.credentials = build_workspace_credentials(
core/GoogleGmailUtils.py:355: in build_workspace_credentials
    adc_creds = get_adc()[0]
                ^^^^^^^^^
.venv/lib/python3.11/site-packages/TIPCommon/rest/auth.py:158: in get_adc
    return google.auth.default(scopes, request, quota_project_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/_default.py:714: in default
    credentials, project_id = checker()
                              ^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/_default.py:710: in <lambda>
    lambda: _get_gce_credentials(request, quota_project_id=quota_project_id),
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/_default.py:406: in _get_gce_credentials
    if _metadata.is_on_gce(request=request):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/compute_engine/_metadata.py:138: in is_on_gce
    if ping(request):
       ^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/compute_engine/_metadata.py:221: in ping
    response = request(
.venv/lib/python3.11/site-packages/google/auth/transport/requests.py:188: in __call__
    response = self.session.request(
tests/conftest.py:214: in mock_session_request
    return session.request(method, url, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/integration_testing/requests/session.py:89: in request
    response: MockResponse = self._do_request(method, request)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/integration_testing/requests/session.py:125: in _do_request
    self._validate_response(response, method, path)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <gmail.tests.core.session.GoogleGmailSession object at 0x7f4d6ea07d10>
response = <object object at 0x7f4d73f859a0>, method = 'GET', path = ''

    def _validate_response(
        self,
        response: Response,
        method: str,
        path: str,
    ) -> None:
        msg: str
        if response is None or response is NotImplemented:
            msg = (
                "Null or UnImplemented Response!"
                f" Request with method '{method}' to URL '{path}'"
                f" returned {response!r} instead of a response object."
                " Perhaps you forgot to return a response object in the correlating"
                " router."
            )
            raise RuntimeError(msg)
    
        if response is NO_RESPONSE:
            msg = (
                f"path '{path}' doesn't match with any of the other '{method}' "
                f"routes patterns: {list(self.routes[method].keys())}"
            )
>           raise ValueError(msg)
E           ValueError: path '' doesn't match with any of the other 'GET' routes patterns: ['/computeMetadata/v1/instance/service-accounts/default/', '/computeMetadata/v1/instance/service-accounts/default/email', '/computeMetadata/v1/instance/service-accounts/\\w+@[a-zA-Z]+\\.com/token']

.venv/lib/python3.11/site-packages/integration_testing/requests/session.py:150: ValueError

The above exception was the direct cause of the following exception:

self = <gmail.tests.test_google_gmail_connector.TestEmailStatusFilter object at 0x7f4d6eefcf10>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ea16ed0>
connector_output = <integration_testing.platform.script_output.MockConnectorOutput object at 0x7f4d6e6047c0>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1782717707852'}}, attachments={}, threads={})

    @set_metadata(
        connector_def_file_path=DEF_PATH,
        parameters=UNREAD_ONLY_PARAMETERS,
    )
    def test_connector_unread_filter(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            connector_output: MockConnectorOutput,
            google_gmail: GoogleGmail,
    ) -> None:
        """Connector with Email Status=Unread runs successfully.
    
        Verifies the connector processes emails correctly when the
        Unread-only filter is enabled.
        """
        google_gmail.set_messages(
            MOCK_DATA["mail_without_attachments"],
            set_ts_to_now=True,
        )
        set_is_test_run_to_true()
    
        loop = asyncio.get_event_loop()
>       loop.run_until_complete(main())

tests/test_google_gmail_connector.py:458: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/asyncio/base_events.py:654: in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
connectors/GmailConnector.py:532: in main
    await asyncio.ensure_future(connector.start())
.venv/lib/python3.11/site-packages/TIPCommon/base/utils.py:152: in wrapper
    return await func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <gmail.connectors.GmailConnector.GoogleGmailConnector object at 0x7f4d6ed9f5d0>

    @async_output_handler
    async def start(self) -> None:
        """
        Executes the connector logic.
    
        Execution steps:
    
            1. Extracting connector script parameters from the SDK connector object
            2. Validate parameters values
            3. Loading the connector context data via the SDK connector object
            4. Initializing the integrations manager(s)
            5. Fetching & parsing alerts from the product via integration manager
            6. Filtering the alerts
            7. Processing the filtered alerts into siemplify alerts
            8. Saving connector context data via the SDK connector object
            9. Sending newly created siemplify alerts to the platform
    
        Raises:
            ConnectorSetupError: if any of the pre-processing phases fail
        """
        self.logger.info(
            f'---------------- Starting connector {self.script_name} '
            'execution ----------------'
        )
        if self.is_test_run:
            self.logger.info(
                '****** This is an \"IDE Play Button\"\\\"Run Connector once\" '
                'test run ******'
            )
    
        self.logger.info(
            '------------------- Main - Param Init -------------------'
        )
        self.extract_params()
        self.logger.info(
            '------------------- Main - Started -------------------'
        )
        processed_alerts = []
    
        try:
            try:
                self.validate_params_wrapper()
                self.read_context_wrapper()
                self.logger.info('Initializing managers...')
                self.init_managers()
            except Exception as e:
>               raise ConnectorSetupError(e) from e
E               TIPCommon.exceptions.ConnectorSetupError: path '' doesn't match with any of the other 'GET' routes patterns: ['/computeMetadata/v1/instance/service-accounts/default/', '/computeMetadata/v1/instance/service-accounts/default/email', '/computeMetadata/v1/instance/service-accounts/\\w+@[a-zA-Z]+\\.com/token']

.venv/lib/python3.11/site-packages/TIPCommon/base/connector/async_connector.py:539: ConnectorSetupError
tests/test_ping.py::TestPing::test_success
self = <gmail.tests.test_ping.TestPing object at 0x7f4d6eda7310>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6e5a7850>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6e65fd00>, _err=<_io.StringIO object at 0x7f4d6e9f2c20>)

    @set_metadata(
        integration_config=CONFIG
    )
    def test_success(
            self,
            gmail_script_session: GoogleGmailSession,
            action_output: MockActionOutput,
    ) -> None:
        action = Ping(script_name=Constants.PING_SCRIPT_NAME)
        action._is_first_run = True
        action.run()
    
>       assert len(gmail_script_session.request_history) == 1
E       assert 0 == 1
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6e5a7850>.request_history

tests/test_ping.py:64: AssertionError
tests/test_ping.py::TestPing::test_invalid_email
self = <gmail.tests.test_ping.TestPing object at 0x7f4d6eda7450>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6e49e950>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6e9f1e10>, _err=<_io.StringIO object at 0x7f4d6e9f2dd0>)

    @set_metadata(
        integration_config=CONFIG_WITH_INVALID_EMAIL
    )
    def test_invalid_email(
            self,
            gmail_script_session: GoogleGmailSession,
            action_output: MockActionOutput,
    ) -> None:
        action = Ping(script_name=Constants.PING_SCRIPT_NAME)
        action._is_first_run = True
        action.run()
    
        assert len(gmail_script_session.request_history) == 0
>       assert INVALID_EMAIL_OUTPUT_MESSAGE in action_output.results.output_message
E       assert 'Failed to connect to the Gmail service!\nReason: Impersonation is not allowed for the provided service account. Please check the "Service Account Token Creator" role to the service account: ' in "Failed to connect to the Gmail service!\nReason: path '' doesn't match with any of the other 'GET' routes patterns: [...tance/service-accounts/default/email', '/computeMetadata/v1/instance/service-accounts/\\\\w+@[a-zA-Z]+\\\\.com/token']"
E        +  where "Failed to connect to the Gmail service!\nReason: path '' doesn't match with any of the other 'GET' routes patterns: [...tance/service-accounts/default/email', '/computeMetadata/v1/instance/service-accounts/\\\\w+@[a-zA-Z]+\\\\.com/token']" = ActionOutput(output_message="Failed to connect to the Gmail service!\nReason: path '' doesn't match with any of the ot...]+\\\\.com/token']", result_value=False, execution_state=<ExecutionState.FAILED: 2>, json_output=None, debug_output='').output_message
E        +    where ActionOutput(output_message="Failed to connect to the Gmail service!\nReason: path '' doesn't match with any of the ot...]+\\\\.com/token']", result_value=False, execution_state=<ExecutionState.FAILED: 2>, json_output=None, debug_output='') = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6e9f1e10>, _err=<_io.StringIO object at 0x7f4d6e9f2dd0>).results

tests/test_ping.py:109: AssertionError
tests/wait_for_thread_reply/test_wait_for_thread_reply.py::TestAuth::test_mailbox_not_found
self = <gmail.tests.wait_for_thread_reply.test_wait_for_thread_reply.TestAuth object at 0x7f4d6eb30c50>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6e7e0810>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6e945120>, _err=<_io.StringIO object at 0x7f4d6e946320>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_INVALID_MAILBOX
    )
    def test_mailbox_not_found(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput,
    ) -> None:
        action = init_async_action(
            WaitForThreadReply,
            script_name=Constants.WAIT_FOR_THREAD_REPLY_SCRIPT_NAME,
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 1
E       assert 0 == 1
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6e7e0810>.request_history

tests/wait_for_thread_reply/test_wait_for_thread_reply.py:116: AssertionError
tests/wait_for_thread_reply/test_wait_for_thread_reply.py::TestMessageID::test_email_not_found
self = <gmail.tests.wait_for_thread_reply.test_wait_for_thread_reply.TestMessageID object at 0x7f4d6eb31d10>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ebd8850>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6e944f70>, _err=<_io.StringIO object at 0x7f4d6e9465f0>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG
    )
    def test_email_not_found(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput,
    ) -> None:
        action = init_async_action(
            WaitForThreadReply,
            script_name=Constants.WAIT_FOR_THREAD_REPLY_SCRIPT_NAME,
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 1
E       assert 0 == 1
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ebd8850>.request_history

tests/wait_for_thread_reply/test_wait_for_thread_reply.py:139: AssertionError
tests/wait_for_thread_reply/test_wait_for_thread_reply.py::TestReplies::test_no_replies
self = <gmail.tests.wait_for_thread_reply.test_wait_for_thread_reply.TestReplies object at 0x7f4d6eb32710>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...ary="000000000000b6f3cf061bb97b6f"'}]}, 'sizeEstimate': 6210, 'historyId': '5297', 'internalDate': '1719332308000'}]}})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6f6f9a50>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6e944040>, _err=<_io.StringIO object at 0x7f4d6e945bd0>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MESSAGE_ID
    )
    def test_no_replies(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
        google_gmail.add_thread(MOCK_DATA["mail_without_attachments"][:1])
    
        action = init_async_action(
            WaitForThreadReply,
            script_name=Constants.WAIT_FOR_THREAD_REPLY_SCRIPT_NAME,
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 3
E       assert 0 == 3
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6f6f9a50>.request_history

tests/wait_for_thread_reply/test_wait_for_thread_reply.py:170: AssertionError
tests/wait_for_thread_reply/test_wait_for_thread_reply.py::TestReplies::test_email_found_single_reply
self = <gmail.tests.wait_for_thread_reply.test_wait_for_thread_reply.TestReplies object at 0x7f4d6eb32b90>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...ry="000000000000b8f8d5061bb97b9a"'}]}, 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}]}})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6eb26710>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6e945ea0>, _err=<_io.StringIO object at 0x7f4d6e946290>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MESSAGE_ID
    )
    def test_email_found_single_reply(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
        google_gmail.add_thread(MOCK_DATA["mail_without_attachments"])
    
        action = init_async_action(
            WaitForThreadReply,
            script_name=Constants.WAIT_FOR_THREAD_REPLY_SCRIPT_NAME,
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 4
E       assert 0 == 4
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6eb26710>.request_history

tests/wait_for_thread_reply/test_wait_for_thread_reply.py:202: AssertionError
tests/wait_for_thread_reply/test_wait_for_thread_reply.py::TestReplies::test_email_found_single_reply_no_wait
self = <gmail.tests.wait_for_thread_reply.test_wait_for_thread_reply.TestReplies object at 0x7f4d6eb330d0>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...ry="000000000000b8f8d5061bb97b9a"'}]}, 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}]}})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6e7dff90>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6e944430>, _err=<_io.StringIO object at 0x7f4d6e945090>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_NO_WAIT
    )
    def test_email_found_single_reply_no_wait(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
        google_gmail.add_thread(MOCK_DATA["mail_without_attachments"])
    
        action = init_async_action(
            WaitForThreadReply,
            script_name=Constants.WAIT_FOR_THREAD_REPLY_SCRIPT_NAME,
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 4
E       assert 0 == 4
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6e7dff90>.request_history

tests/wait_for_thread_reply/test_wait_for_thread_reply.py:235: AssertionError
tests/wait_for_thread_reply/test_wait_for_thread_reply.py::TestReplies::test_email_found_all_replies
self = <gmail.tests.wait_for_thread_reply.test_wait_for_thread_reply.TestReplies object at 0x7f4d6eb33e50>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...faXAiOiAiMjA5Ljg1LjE2Ny43NCIgfQ=='}]}, 'sizeEstimate': 46276, 'historyId': '5439', 'internalDate': '1721989290000'}]}})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6eb401d0>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6e944280>, _err=<_io.StringIO object at 0x7f4d6e944790>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MESSAGE_ID
    )
    def test_email_found_all_replies(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(
            MOCK_DATA["mail_without_attachments"] +
            MOCK_DATA["mail_with_eml"] +
            MOCK_DATA["mail_with_files"]
        )
        google_gmail.add_thread(
            MOCK_DATA["mail_without_attachments"] +
            MOCK_DATA["mail_with_eml"] +
            MOCK_DATA["mail_with_files"]
        )
    
        action = init_async_action(
            WaitForThreadReply,
            script_name=Constants.WAIT_FOR_THREAD_REPLY_SCRIPT_NAME,
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 6
E       assert 0 == 6
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6eb401d0>.request_history

tests/wait_for_thread_reply/test_wait_for_thread_reply.py:275: AssertionError
tests/wait_for_thread_reply/test_wait_for_thread_reply.py::TestAsyncTimeout::test_no_replies
self = <gmail.tests.wait_for_thread_reply.test_wait_for_thread_reply.TestAsyncTimeout object at 0x7f4d6eb424d0>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...ary="000000000000b6f3cf061bb97b6f"'}]}, 'sizeEstimate': 6210, 'historyId': '5297', 'internalDate': '1719332308000'}]}})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ea75c90>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6e946320>, _err=<_io.StringIO object at 0x7f4d6e946440>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MESSAGE_ID
    )
    def test_no_replies(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
        google_gmail.add_thread(MOCK_DATA["mail_without_attachments"][:1])
    
        action = init_async_action(
            WaitForThreadReply,
            script_name=Constants.WAIT_FOR_THREAD_REPLY_SCRIPT_NAME,
            async_timeout_ms=0,
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 3
E       assert 0 == 3
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ea75c90>.request_history

tests/wait_for_thread_reply/test_wait_for_thread_reply.py:311: AssertionError
tests/wait_for_thread_reply/test_wait_for_thread_reply.py::TestAsyncTimeout::test_email_found_single_reply
self = <gmail.tests.wait_for_thread_reply.test_wait_for_thread_reply.TestAsyncTimeout object at 0x7f4d6eb31590>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...ry="000000000000b8f8d5061bb97b9a"'}]}, 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}]}})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ea86b50>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4d6e944820>, _err=<_io.StringIO object at 0x7f4d6e945e10>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MESSAGE_ID
    )
    def test_email_found_single_reply(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
        google_gmail.add_thread(MOCK_DATA["mail_without_attachments"])
    
        action = init_async_action(
            WaitForThreadReply,
            script_name=Constants.WAIT_FOR_THREAD_REPLY_SCRIPT_NAME,
        )
        action.is_approaching_async_timeout = lambda: True
        action.run()
    
>       assert len(gmail_script_session.request_history) == 4
E       assert 0 == 4
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f4d6ea86b50>.request_history

tests/wait_for_thread_reply/test_wait_for_thread_reply.py:340: AssertionError

🧩 cloud_logging

✅ Passed ❌ Failed ⏭️ Skipped
7 6 0

❌ Failed Tests

tests/execute_query/test_execute_query.py::TestExecuteQuery::test_invalid_email
self = <cloud_logging.tests.execute_query.test_execute_query.TestExecuteQuery object at 0x7fb980c274d0>
gcloud_api_script_session = <cloud_logging.tests.core.session.GoogleCloudApiSession object at 0x7fb980bd2010>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7fb980c4d120>, _err=<_io.StringIO object at 0x7fb980c4c8b0>)

    @set_metadata(
        integration_config=CONFIG_WITH_INVALID_EMAIL,
        parameters=ACTION_CONFIG,
    )
    def test_invalid_email(
        self,
        gcloud_api_script_session: GoogleCloudApiSession,
        action_output: MockActionOutput,
    ) -> None:
        ExecuteQuery().run()
    
>       assert len(gcloud_api_script_session.request_history) >= 2
E       assert 0 >= 2
E        +  where 0 = len([])
E        +    where [] = <cloud_logging.tests.core.session.GoogleCloudApiSession object at 0x7fb980bd2010>.request_history

tests/execute_query/test_execute_query.py:112: AssertionError
tests/execute_query/test_execute_query.py::TestExecuteQuery::test_proper_run
self = <cloud_logging.tests.execute_query.test_execute_query.TestExecuteQuery object at 0x7fb980c27f90>
gcloud_api_script_session = <cloud_logging.tests.core.session.GoogleCloudApiSession object at 0x7fb980bd15d0>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7fb980c4cf70>, _err=<_io.StringIO object at 0x7fb980c4c820>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG,
    )
    def test_proper_run(
        self,
        gcloud_api_script_session: GoogleCloudApiSession,
        action_output: MockActionOutput,
    ) -> None:
        ExecuteQuery().run()
        message = (
            f"Successfully executed query \"{ACTION_CONFIG['Query']} "
            "AND timestamp >= \"2024-10-23T11:46:46.549337+00:00\" AND "
            "timestamp <= \"2024-10-24T11:46:46.549337+00:00\"\""
            " in Cloud Logging"
        )
>       assert len(gcloud_api_script_session.request_history) >= 3
E       assert 0 >= 3
E        +  where 0 = len([])
E        +    where [] = <cloud_logging.tests.core.session.GoogleCloudApiSession object at 0x7fb980bd15d0>.request_history

tests/execute_query/test_execute_query.py:145: AssertionError
tests/execute_query/test_execute_query.py::TestExecuteQuery::test_invalid_max_value
self = <cloud_logging.tests.execute_query.test_execute_query.TestExecuteQuery object at 0x7fb980c305d0>
gcloud_api_script_session = <cloud_logging.tests.core.session.GoogleCloudApiSession object at 0x7fb980bffb50>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7fb980c4d510>, _err=<_io.StringIO object at 0x7fb980c4d360>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_INVALID_MAX,
    )
    def test_invalid_max_value(
        self,
        gcloud_api_script_session: GoogleCloudApiSession,
        action_output: MockActionOutput,
    ) -> None:
        ExecuteQuery().run()
    
>       assert len(gcloud_api_script_session.request_history) >= 2
E       assert 0 >= 2
E        +  where 0 = len([])
E        +    where [] = <cloud_logging.tests.core.session.GoogleCloudApiSession object at 0x7fb980bffb50>.request_history

tests/execute_query/test_execute_query.py:170: AssertionError
tests/execute_query/test_execute_query.py::TestExecuteQuery::test_invalid_time_frame
self = <cloud_logging.tests.execute_query.test_execute_query.TestExecuteQuery object at 0x7fb980c31350>
gcloud_api_script_session = <cloud_logging.tests.core.session.GoogleCloudApiSession object at 0x7fb980bfe110>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7fb980c4e0e0>, _err=<_io.StringIO object at 0x7fb980c4f760>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_INVALID_TIME_FRAME,
    )
    def test_invalid_time_frame(
        self,
        gcloud_api_script_session: GoogleCloudApiSession,
        action_output: MockActionOutput,
    ) -> None:
        ExecuteQuery().run()
    
>       assert len(gcloud_api_script_session.request_history) >= 2
E       assert 0 >= 2
E        +  where 0 = len([])
E        +    where [] = <cloud_logging.tests.core.session.GoogleCloudApiSession object at 0x7fb980bfe110>.request_history

tests/execute_query/test_execute_query.py:189: AssertionError
tests/test_ping.py::TestPing::test_invalid_email
self = <cloud_logging.tests.test_ping.TestPing object at 0x7fb980bbfd10>
gcloud_api_script_session = <cloud_logging.tests.core.session.GoogleCloudApiSession object at 0x7fb980bc6250>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7fb980c4f9a0>, _err=<_io.StringIO object at 0x7fb980c4f130>)

    @set_metadata(
        integration_config=CONFIG_WITH_INVALID_EMAIL,
    )
    def test_invalid_email(
        self,
        gcloud_api_script_session: GoogleCloudApiSession,
        action_output: MockActionOutput,
    ) -> None:
        Ping().run()
    
>       assert len(gcloud_api_script_session.request_history) >= 2
E       assert 0 >= 2
E        +  where 0 = len([])
E        +    where [] = <cloud_logging.tests.core.session.GoogleCloudApiSession object at 0x7fb980bc6250>.request_history

tests/test_ping.py:83: AssertionError
tests/test_ping.py::TestPing::test_valid_run
self = <cloud_logging.tests.test_ping.TestPing object at 0x7fb9810960d0>
gcloud_api_script_session = <cloud_logging.tests.core.session.GoogleCloudApiSession object at 0x7fb980c27550>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7fb980c4f880>, _err=<_io.StringIO object at 0x7fb980c4ff40>)

    @set_metadata(
        integration_config=CONFIG,
    )
    def test_valid_run(
        self,
        gcloud_api_script_session: GoogleCloudApiSession,
        action_output: MockActionOutput,
    ) -> None:
        Ping().run()
>       assert len(gcloud_api_script_session.request_history) >= 3
E       assert 0 >= 3
E        +  where 0 = len([])
E        +    where [] = <cloud_logging.tests.core.session.GoogleCloudApiSession object at 0x7fb980c27550>.request_history

tests/test_ping.py:109: AssertionError

🧩 vertex_ai

✅ Passed ❌ Failed ⏭️ Skipped
6 15 0

❌ Failed Tests

tests/test_actions/test_publisher_name.py::test_configure_initial_publisher_name
vertexai_script_session = <vertex_ai.tests.core.session.ApiSession object at 0x7fcad8d54250>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7fcad852feb0>, _err=<_io.StringIO object at 0x7fcada1b3eb0>)

    @set_metadata(
        integration_config=NEW_CONFIG,
        parameters={
            "Model ID": "gemini-1.5-flash-002",
            "Text Prompt": "Sample text.",
            "Temperature": None,
            "Candidate Count": None,
            "Response MIME type": "text/plain",
            "Response Schema": None,
            "Max Input Tokens": None,
            "Max Output Tokens": None,
        },
    )
    def test_configure_initial_publisher_name(
        vertexai_script_session: ApiSession,
        action_output: MockActionOutput,
    ) -> None:
        action = ExecutePrompt(script_name=Constants.EXECUTE_PROMPT_SCRIPT_NAME)
        action.run()
    
>       assert len(vertexai_script_session.request_history) >= 2
E       assert 0 >= 2
E        +  where 0 = len([])
E        +    where [] = <vertex_ai.tests.core.session.ApiSession object at 0x7fcad8d54250>.request_history

tests/test_actions/test_publisher_name.py:55: AssertionError
tests/test_actions/test_publisher_name.py::test_with_provided_publisher_name_in_action
vertexai_script_session = <vertex_ai.tests.core.session.ApiSession object at 0x7fcad8444ed0>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7fcad9d6d2d0>, _err=<_io.StringIO object at 0x7fcad9d6d480>)

    @set_metadata(
        integration_config=NEW_CONFIG2,
        parameters={
            "Model ID": "gemini-1.5-flash-002",
            "Text Prompt": "Sample text.",
            "Temperature": None,
            "Candidate Count": None,
            "Response MIME type": "text/plain",
            "Response Schema": None,
            "Max Input Tokens": None,
            "Max Output Tokens": None,
            "Publisher Name": NEW_PUBLISHER_NAME,
        },
    )
    def test_with_provided_publisher_name_in_action(
        vertexai_script_session: ApiSession,
        action_output: MockActionOutput,
    ) -> None:
        action = ExecutePrompt(script_name=Constants.EXECUTE_PROMPT_SCRIPT_NAME)
        action.run()
    
>       assert len(vertexai_script_session.request_history) >= 2
E       assert 0 >= 2
E        +  where 0 = len([])
E        +    where [] = <vertex_ai.tests.core.session.ApiSession object at 0x7fcad8444ed0>.request_history

tests/test_actions/test_publisher_name.py:101: AssertionError
tests/test_analyze_eml/test_analyze_eml.py::TestAuth::test_invalid_email
self = <vertex_ai.tests.test_analyze_eml.test_analyze_eml.TestAuth object at 0x7fcad82af890>
vertexai_script_session = <vertex_ai.tests.core.session.ApiSession object at 0x7fcad8484550>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7fcad9d6ec20>, _err=<_io.StringIO object at 0x7fcada1b3be0>)

    @set_metadata(
        integration_config=CONFIG_WITH_INVALID_EMAIL
    )
    def test_invalid_email(
            self,
            vertexai_script_session: ApiSession,
            action_output: MockActionOutput,
    ) -> None:
        AnalyzeEML(script_name=Constants.ANALYZE_EML_SCRIPT_NAME).run()
    
>       assert len(vertexai_script_session.request_history) >= 1
E       assert 0 >= 1
E        +  where 0 = len([])
E        +    where [] = <vertex_ai.tests.core.session.ApiSession object at 0x7fcad8484550>.request_history

tests/test_analyze_eml/test_analyze_eml.py:103: AssertionError
tests/test_analyze_eml/test_analyze_eml.py::TestValid::test_invalid_files
self = <vertex_ai.tests.test_analyze_eml.test_analyze_eml.TestValid object at 0x7fcad82ae110>
vertexai_script_session = <vertex_ai.tests.core.session.ApiSession object at 0x7fcad8445090>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7fcad9d38b80>, _err=<_io.StringIO object at 0x7fcad9d393f0>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG,
    )
    def test_invalid_files(
            self,
            vertexai_script_session: ApiSession,
            action_output: MockActionOutput,
    ) -> None:
        AnalyzeEML(script_name=Constants.ANALYZE_EML_SCRIPT_NAME).run()
    
>       assert len(vertexai_script_session.request_history) >= 1
E       assert 0 >= 1
E        +  where 0 = len([])
E        +    where [] = <vertex_ai.tests.core.session.ApiSession object at 0x7fcad8445090>.request_history

tests/test_analyze_eml/test_analyze_eml.py:128: AssertionError
tests/test_analyze_eml/test_analyze_eml.py::TestValid::test_valid_invalid_files
self = <vertex_ai.tests.test_analyze_eml.test_analyze_eml.TestValid object at 0x7fcad82adcd0>
vertexai_script_session = <vertex_ai.tests.core.session.ApiSession object at 0x7fcad8d2c690>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7fcad9d39510>, _err=<_io.StringIO object at 0x7fcad9d39bd0>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_FILES,
    )
    def test_valid_invalid_files(
            self,
            vertexai_script_session: ApiSession,
            action_output: MockActionOutput,
    ) -> None:
        action = AnalyzeEML(script_name=Constants.ANALYZE_EML_SCRIPT_NAME)
        action.run()
        delete_test_attachments(ACTION_CONFIG_WITH_FILES["Files To Analyze"])
    
>       assert len(vertexai_script_session.request_history) >= 2
E       assert 0 >= 2
E        +  where 0 = len([])
E        +    where [] = <vertex_ai.tests.core.session.ApiSession object at 0x7fcad8d2c690>.request_history

tests/test_analyze_eml/test_analyze_eml.py:147: AssertionError
tests/test_describe_entity/test_describe_entity.py::TestAuth::test_invalid_email
self = <vertex_ai.tests.test_describe_entity.test_describe_entity.TestAuth object at 0x7fcad8427650>
vertexai_script_session = <vertex_ai.tests.core.session.ApiSession object at 0x7fcad8a3b050>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7fcad9d3a8c0>, _err=<_io.StringIO object at 0x7fcad9d3a3b0>)

    @set_metadata(integration_config=CONFIG_WITH_INVALID_EMAIL)
    def test_invalid_email(
            self,
            vertexai_script_session: ApiSession,
            action_output: MockActionOutput,
    ) -> None:
        DescribeEntity(script_name=Constants.DESCRIBE_ENTITY_SCRIPT_NAME).run()
    
>       assert len(vertexai_script_session.request_history) >= 1
E       assert 0 >= 1
E        +  where 0 = len([])
E        +    where [] = <vertex_ai.tests.core.session.ApiSession object at 0x7fcad8a3b050>.request_history

tests/test_describe_entity/test_describe_entity.py:90: AssertionError
tests/test_describe_entity/test_describe_entity.py::TestValid::test_valid_run
self = <vertex_ai.tests.test_describe_entity.test_describe_entity.TestValid object at 0x7fcad84274d0>
vertexai_script_session = <vertex_ai.tests.core.session.ApiSession object at 0x7fcad82af510>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7fcad9d3a9e0>, _err=<_io.StringIO object at 0x7fcad9d3bac0>)
external_context = MockExternalContext(_rows={})

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG,
        entities=[
            DomainEntityInfo(
                identifier="user@email.com",
                additional_properties={"Environment": "Default Environment"},
                alert_identifier="test-alert",
                case_identifier=1,
                creation_time=unix_now(),
                modification_time=unix_now(),
                entity_type="UserUniqname",
                is_pivot=False,
                is_artifact=False,
                is_enriched=True,
                is_internal=True,
                is_suspicious=True,
                is_vulnerable=False,
            )
        ],
        external_context=MockExternalContext(),
    )
    def test_valid_run(
            self,
            vertexai_script_session: ApiSession,
            action_output: MockActionOutput,
            external_context: MockExternalContext,
    ) -> None:
        action = DescribeEntity(script_name=Constants.DESCRIBE_ENTITY_SCRIPT_NAME)
        action.soar_action.execution_deadline_unix_time_ms = unix_now() + 60_000
        action.soar_action.session = vertexai_script_session
        action.run()
    
>       assert len(vertexai_script_session.request_history) >= 2
E       assert 0 >= 2
E        +  where 0 = len([])
E        +    where [] = <vertex_ai.tests.core.session.ApiSession object at 0x7fcad82af510>.request_history

tests/test_describe_entity/test_describe_entity.py:137: AssertionError
tests/test_execute_prompt/test_execute_prompt.py::TestAuth::test_invalid_email
self = <vertex_ai.tests.test_execute_prompt.test_execute_prompt.TestAuth object at 0x7fcad82cc750>
vertexai_script_session = <vertex_ai.tests.core.session.ApiSession object at 0x7fcad84088d0>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7fcad9c9c430>, _err=<_io.StringIO object at 0x7fcad9c9c4c0>)

    @set_metadata(integration_config=CONFIG_WITH_INVALID_EMAIL)
    def test_invalid_email(
        self,
        vertexai_script_session: ApiSession,
        action_output: MockActionOutput,
    ) -> None:
        ExecutePrompt(script_name=Constants.EXECUTE_PROMPT_SCRIPT_NAME).run()
    
>       assert len(vertexai_script_session.request_history) >= 1
E       assert 0 >= 1
E        +  where 0 = len([])
E        +    where [] = <vertex_ai.tests.core.session.ApiSession object at 0x7fcad84088d0>.request_history

tests/test_execute_prompt/test_execute_prompt.py:86: AssertionError
tests/test_execute_prompt/test_execute_prompt.py::TestValid::test_token_count
self = <vertex_ai.tests.test_execute_prompt.test_execute_prompt.TestValid object at 0x7fcad82cd810>
vertexai_script_session = <vertex_ai.tests.core.session.ApiSession object at 0x7fcad8493b10>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7fcad9d3a710>, _err=<_io.StringIO object at 0x7fcad9d3a8c0>)

    @set_metadata(integration_config=CONFIG, parameters=ACTION_CONFIG_WITH_TOKEN_COUNT)
    def test_token_count(
        self,
        vertexai_script_session: ApiSession,
        action_output: MockActionOutput,
    ) -> None:
        ExecutePrompt(script_name=Constants.EXECUTE_PROMPT_SCRIPT_NAME).run()
    
>       assert len(vertexai_script_session.request_history) >= 1
E       assert 0 >= 1
E        +  where 0 = len([])
E        +    where [] = <vertex_ai.tests.core.session.ApiSession object at 0x7fcad8493b10>.request_history

tests/test_execute_prompt/test_execute_prompt.py:110: AssertionError
tests/test_execute_prompt/test_execute_prompt.py::TestValid::test_valid_run
self = <vertex_ai.tests.test_execute_prompt.test_execute_prompt.TestValid object at 0x7fcad82cd950>
vertexai_script_session = <vertex_ai.tests.core.session.ApiSession object at 0x7fcad8412010>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7fcad9d3a3b0>, _err=<_io.StringIO object at 0x7fcad9d39a20>)

    @set_metadata(integration_config=CONFIG, parameters=ACTION_CONFIG)
    def test_valid_run(
        self,
        vertexai_script_session: ApiSession,
        action_output: MockActionOutput,
    ) -> None:
        action = ExecutePrompt(script_name=Constants.EXECUTE_PROMPT_SCRIPT_NAME)
        action.run()
    
>       assert len(vertexai_script_session.request_history) >= 2
E       assert 0 >= 2
E        +  where 0 = len([])
E        +    where [] = <vertex_ai.tests.core.session.ApiSession object at 0x7fcad8412010>.request_history

tests/test_execute_prompt/test_execute_prompt.py:126: AssertionError
tests/test_ping.py::TestPing::test_success
self = <vertex_ai.tests.test_ping.TestPing object at 0x7fcad8673790>
vertexai_script_session = <vertex_ai.tests.core.session.ApiSession object at 0x7fcad82cca10>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7fcad9d39bd0>, _err=<_io.StringIO object at 0x7fcad83efe20>)

    @set_metadata(
        integration_config=CONFIG
    )
    def test_success(
            self,
            vertexai_script_session: ApiSession,
            action_output: MockActionOutput,
    ) -> None:
        Ping(script_name=Constants.PING_SCRIPT_NAME).run()
    
>       assert len(vertexai_script_session.request_history) >= 1
E       assert 0 >= 1
E        +  where 0 = len([])
E        +    where [] = <vertex_ai.tests.core.session.ApiSession object at 0x7fcad82cca10>.request_history

tests/test_ping.py:63: AssertionError
tests/test_ping.py::TestPing::test_invalid_email
self = <vertex_ai.tests.test_ping.TestPing object at 0x7fcad8872490>
vertexai_script_session = <vertex_ai.tests.core.session.ApiSession object at 0x7fcad840b610>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7fcad8244c10>, _err=<_io.StringIO object at 0x7fcad8245e10>)

    @set_metadata(
        integration_config=CONFIG_WITH_INVALID_EMAIL
    )
    def test_invalid_email(
            self,
            vertexai_script_session: ApiSession,
            action_output: MockActionOutput,
    ) -> None:
        Ping(script_name=Constants.PING_SCRIPT_NAME).run()
    
>       assert len(vertexai_script_session.request_history) >= 1
E       assert 0 >= 1
E        +  where 0 = len([])
E        +    where [] = <vertex_ai.tests.core.session.ApiSession object at 0x7fcad840b610>.request_history

tests/test_ping.py:99: AssertionError
tests/test_transform_data/test_transform_data.py::TestAuth::test_invalid_email
self = <vertex_ai.tests.test_transform_data.test_transform_data.TestAuth object at 0x7fcad860d150>
vertexai_script_session = <vertex_ai.tests.core.session.ApiSession object at 0x7fcad834b710>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7fcad8246440>, _err=<_io.StringIO object at 0x7fcad8246290>)

    @set_metadata(integration_config=CONFIG_WITH_INVALID_EMAIL)
    def test_invalid_email(
        self,
        vertexai_script_session: ApiSession,
        action_output: MockActionOutput,
    ) -> None:
        TransformData().run()
    
>       assert len(vertexai_script_session.request_history) >= 1
E       assert 0 >= 1
E        +  where 0 = len([])
E        +    where [] = <vertex_ai.tests.core.session.ApiSession object at 0x7fcad834b710>.request_history

tests/test_transform_data/test_transform_data.py:88: AssertionError
tests/test_transform_data/test_transform_data.py::TestValid::test_valid
self = <vertex_ai.tests.test_transform_data.test_transform_data.TestValid object at 0x7fcad8452350>
vertexai_script_session = <vertex_ai.tests.core.session.ApiSession object at 0x7fcad80d7290>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7fcad8246200>, _err=<_io.StringIO object at 0x7fcad82444c0>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG,
    )
    def test_valid(
        self,
        vertexai_script_session: ApiSession,
        action_output: MockActionOutput,
    ) -> None:
        TransformData().run()
    
>       assert len(vertexai_script_session.request_history) >= 3
E       assert 0 >= 3
E        +  where 0 = len([])
E        +    where [] = <vertex_ai.tests.core.session.ApiSession object at 0x7fcad80d7290>.request_history

tests/test_transform_data/test_transform_data.py:115: AssertionError
tests/test_transform_data/test_transform_data.py::TestValid::test_invalid_json
self = <vertex_ai.tests.test_transform_data.test_transform_data.TestValid object at 0x7fcad8452e10>
vertexai_script_session = <vertex_ai.tests.core.session.ApiSession object at 0x7fcad8389090>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7fcad8244d30>, _err=<_io.StringIO object at 0x7fcad82452d0>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_INVALID_JSON,
    )
    def test_invalid_json(
        self,
        vertexai_script_session: ApiSession,
        action_output: MockActionOutput,
    ) -> None:
        action = TransformData()
        action.run()
    
>       assert len(vertexai_script_session.request_history) >= 2
E       assert 0 >= 2
E        +  where 0 = len([])
E        +    where [] = <vertex_ai.tests.core.session.ApiSession object at 0x7fcad8389090>.request_history

tests/test_transform_data/test_transform_data.py:133: AssertionError

🧩 okta

✅ Passed ❌ Failed ⏭️ Skipped
0 1 0

❌ Failed Tests

Test Execution Failure
JSON report not found at /home/runner/work/content-hub/content-hub/content/response_integrations/google/okta/.report.json. The test execution script might have failed before running pytest.

@github-actions

Copy link
Copy Markdown

Integration Tests Failed

Click to view the full report

🧩 cloud_logging

✅ Passed ❌ Failed ⏭️ Skipped
7 6 0

❌ Failed Tests

tests/execute_query/test_execute_query.py::TestExecuteQuery::test_invalid_email
self = <cloud_logging.tests.execute_query.test_execute_query.TestExecuteQuery object at 0x7f4ab6e33010>
gcloud_api_script_session = <cloud_logging.tests.core.session.GoogleCloudApiSession object at 0x7f4ab70b9c10>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4ab6e59120>, _err=<_io.StringIO object at 0x7f4ab6e588b0>)

    @set_metadata(
        integration_config=CONFIG_WITH_INVALID_EMAIL,
        parameters=ACTION_CONFIG,
    )
    def test_invalid_email(
        self,
        gcloud_api_script_session: GoogleCloudApiSession,
        action_output: MockActionOutput,
    ) -> None:
        ExecuteQuery().run()
    
>       assert len(gcloud_api_script_session.request_history) >= 2
E       assert 0 >= 2
E        +  where 0 = len([])
E        +    where [] = <cloud_logging.tests.core.session.GoogleCloudApiSession object at 0x7f4ab70b9c10>.request_history

tests/execute_query/test_execute_query.py:112: AssertionError
tests/execute_query/test_execute_query.py::TestExecuteQuery::test_proper_run
self = <cloud_logging.tests.execute_query.test_execute_query.TestExecuteQuery object at 0x7f4ab6e33dd0>
gcloud_api_script_session = <cloud_logging.tests.core.session.GoogleCloudApiSession object at 0x7f4ab6e31690>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4ab6e58f70>, _err=<_io.StringIO object at 0x7f4ab6e58820>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG,
    )
    def test_proper_run(
        self,
        gcloud_api_script_session: GoogleCloudApiSession,
        action_output: MockActionOutput,
    ) -> None:
        ExecuteQuery().run()
        message = (
            f"Successfully executed query \"{ACTION_CONFIG['Query']} "
            "AND timestamp >= \"2024-10-23T11:46:46.549337+00:00\" AND "
            "timestamp <= \"2024-10-24T11:46:46.549337+00:00\"\""
            " in Cloud Logging"
        )
>       assert len(gcloud_api_script_session.request_history) >= 3
E       assert 0 >= 3
E        +  where 0 = len([])
E        +    where [] = <cloud_logging.tests.core.session.GoogleCloudApiSession object at 0x7f4ab6e31690>.request_history

tests/execute_query/test_execute_query.py:145: AssertionError
tests/execute_query/test_execute_query.py::TestExecuteQuery::test_invalid_max_value
self = <cloud_logging.tests.execute_query.test_execute_query.TestExecuteQuery object at 0x7f4ab6e490d0>
gcloud_api_script_session = <cloud_logging.tests.core.session.GoogleCloudApiSession object at 0x7f4ab6e57f10>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4ab6e59510>, _err=<_io.StringIO object at 0x7f4ab6e59360>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_INVALID_MAX,
    )
    def test_invalid_max_value(
        self,
        gcloud_api_script_session: GoogleCloudApiSession,
        action_output: MockActionOutput,
    ) -> None:
        ExecuteQuery().run()
    
>       assert len(gcloud_api_script_session.request_history) >= 2
E       assert 0 >= 2
E        +  where 0 = len([])
E        +    where [] = <cloud_logging.tests.core.session.GoogleCloudApiSession object at 0x7f4ab6e57f10>.request_history

tests/execute_query/test_execute_query.py:170: AssertionError
tests/execute_query/test_execute_query.py::TestExecuteQuery::test_invalid_time_frame
self = <cloud_logging.tests.execute_query.test_execute_query.TestExecuteQuery object at 0x7f4ab6e485d0>
gcloud_api_script_session = <cloud_logging.tests.core.session.GoogleCloudApiSession object at 0x7f4ab6e55cd0>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4ab6e5a0e0>, _err=<_io.StringIO object at 0x7f4ab6e5b760>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_INVALID_TIME_FRAME,
    )
    def test_invalid_time_frame(
        self,
        gcloud_api_script_session: GoogleCloudApiSession,
        action_output: MockActionOutput,
    ) -> None:
        ExecuteQuery().run()
    
>       assert len(gcloud_api_script_session.request_history) >= 2
E       assert 0 >= 2
E        +  where 0 = len([])
E        +    where [] = <cloud_logging.tests.core.session.GoogleCloudApiSession object at 0x7f4ab6e55cd0>.request_history

tests/execute_query/test_execute_query.py:189: AssertionError
tests/test_ping.py::TestPing::test_invalid_email
self = <cloud_logging.tests.test_ping.TestPing object at 0x7f4ab6dcbe50>
gcloud_api_script_session = <cloud_logging.tests.core.session.GoogleCloudApiSession object at 0x7f4ab6e00310>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4ab6e5b9a0>, _err=<_io.StringIO object at 0x7f4ab6e5b130>)

    @set_metadata(
        integration_config=CONFIG_WITH_INVALID_EMAIL,
    )
    def test_invalid_email(
        self,
        gcloud_api_script_session: GoogleCloudApiSession,
        action_output: MockActionOutput,
    ) -> None:
        Ping().run()
    
>       assert len(gcloud_api_script_session.request_history) >= 2
E       assert 0 >= 2
E        +  where 0 = len([])
E        +    where [] = <cloud_logging.tests.core.session.GoogleCloudApiSession object at 0x7f4ab6e00310>.request_history

tests/test_ping.py:83: AssertionError
tests/test_ping.py::TestPing::test_valid_run
self = <cloud_logging.tests.test_ping.TestPing object at 0x7f4ab6dcba10>
gcloud_api_script_session = <cloud_logging.tests.core.session.GoogleCloudApiSession object at 0x7f4ab6e22dd0>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4ab6e5b880>, _err=<_io.StringIO object at 0x7f4ab6e5bf40>)

    @set_metadata(
        integration_config=CONFIG,
    )
    def test_valid_run(
        self,
        gcloud_api_script_session: GoogleCloudApiSession,
        action_output: MockActionOutput,
    ) -> None:
        Ping().run()
>       assert len(gcloud_api_script_session.request_history) >= 3
E       assert 0 >= 3
E        +  where 0 = len([])
E        +    where [] = <cloud_logging.tests.core.session.GoogleCloudApiSession object at 0x7f4ab6e22dd0>.request_history

tests/test_ping.py:109: AssertionError

🧩 gmail

✅ Passed ❌ Failed ⏭️ Skipped
11 76 0

❌ Failed Tests

tests/add_email_label/test_add_email_label.py::TestInvalidParams::test_without_params
self = <gmail.tests.add_email_label.test_add_email_label.TestInvalidParams object at 0x7f9243e42050>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243c331d0>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243e86050>, _err=<_io.StringIO object at 0x7f9243e856c0>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG
    )
    def test_without_params(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput,
    ) -> None:
        action = AddEmailLabel(script_name=Constants.ADD_EMAIL_LABEL_SCRIPT_NAME)
        action.run()
    
>       assert len(gmail_script_session.request_history) == 2
E       assert 0 == 2
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243c331d0>.request_history

tests/add_email_label/test_add_email_label.py:116: AssertionError
tests/add_email_label/test_add_email_label.py::TestInvalidParams::test_invalid_message_id
self = <gmail.tests.add_email_label.test_add_email_label.TestInvalidParams object at 0x7f9243e425d0>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243dfdfd0>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243e86b00>, _err=<_io.StringIO object at 0x7f9243dbcb80>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MESSAGE_ID
    )
    def test_invalid_message_id(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        action = AddEmailLabel(script_name=Constants.ADD_EMAIL_LABEL_SCRIPT_NAME)
        action.run()
    
>       assert len(gmail_script_session.request_history) == 2
E       assert 0 == 2
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243dfdfd0>.request_history

tests/add_email_label/test_add_email_label.py:141: AssertionError
tests/add_email_label/test_add_email_label.py::TestMessageID::test_search_message_by_message_id
self = <gmail.tests.add_email_label.test_add_email_label.TestMessageID object at 0x7f9243e42e50>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243c06290>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243dbcaf0>, _err=<_io.StringIO object at 0x7f9243dbcdc0>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MESSAGE_ID
    )
    def test_search_message_by_message_id(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
    
        action = AddEmailLabel(script_name=Constants.ADD_EMAIL_LABEL_SCRIPT_NAME)
        action.run()
    
>       assert len(gmail_script_session.request_history) == 3
E       assert 0 == 3
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243c06290>.request_history

tests/add_email_label/test_add_email_label.py:171: AssertionError
tests/add_email_label/test_add_email_label.py::TestFilter::test_search_message_default_filter
self = <gmail.tests.add_email_label.test_add_email_label.TestFilter object at 0x7f9243e43610>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243dd2510>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243dbd1b0>, _err=<_io.StringIO object at 0x7f9243dbd2d0>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MAILBOXES
    )
    def test_search_message_default_filter(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
    
        action = AddEmailLabel(script_name=Constants.ADD_EMAIL_LABEL_SCRIPT_NAME)
        action.run()
    
>       assert len(gmail_script_session.request_history) == 3
E       assert 0 == 3
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243dd2510>.request_history

tests/add_email_label/test_add_email_label.py:199: AssertionError
tests/add_email_label/test_add_email_label.py::TestFilter::test_search_message_empty_filter
self = <gmail.tests.add_email_label.test_add_email_label.TestFilter object at 0x7f9243e43b50>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243d17690>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243dbd3f0>, _err=<_io.StringIO object at 0x7f9243dbd990>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_EMPTY_FILTER
    )
    def test_search_message_empty_filter(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
    
        action = AddEmailLabel(script_name=Constants.ADD_EMAIL_LABEL_SCRIPT_NAME)
        action.run()
    
        assert len(gmail_script_session.request_history) == 0
>       assert action_output.results == ActionOutput(
            output_message=F"{ERROR} {EMPTY_PARAMS_MESSAGE}",
            result_value=False,
            execution_state=ExecutionState.FAILED,
            json_output=None,
        )
E       assert ActionOutput(...bug_output='') == ActionOutput(...bug_output='')
E         
E         Omitting 4 identical items, use -vv to show
E         Differing attributes:
E         ['output_message']
E         
E         Drill down into differing attribute output_message:
E           output_message: 'Error executing action "Add Email Label"\nReason: path \'\' doesn\'t match with any of the other \'GET\' routes patterns: [\'/computeMetadata/v1/instance/service-accounts/default/\', \'/computeMetadata/v1/instance/service-accounts/default/email\', \'/computeMetadata/v1/instance/service-accounts/\\\\w+@[a-zA-Z]+\\\\.com/token\']' != 'Error executing action "Add Email Label"\nReason: configure the "Internet Message ID" parameter or one of the "Subject Filter", "Labels Filter", "Sender Filter", or "Time Frame (minutes)" parameters.'
E           Skipping 39 identical leading characters in diff, use -v to show
E             "
E           - Reason: configure the "Internet Message ID" parameter or one of the "Subject Filter", "Labels Filter", "Sender Filter", or "Time Frame (minutes)" parameters.
E           + Reason: path '' doesn't match with any of the other 'GET' routes patterns: ['/computeMetadata/v1/instance/service-accounts/default/', '/computeMetadata/v1/instance/service-accounts/default/email', '/computeMetadata/v1/instance/service-accounts/\\w+@[a-zA-Z]+\\.com/token']

tests/add_email_label/test_add_email_label.py:226: AssertionError
tests/add_email_label/test_add_email_label.py::TestFilter::test_search_message_time_filter
self = <gmail.tests.add_email_label.test_add_email_label.TestFilter object at 0x7f9243e041d0>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1782723837998'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243d0d2d0>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243dbd870>, _err=<_io.StringIO object at 0x7f9243dbdfc0>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_TIMEFRAME
    )
    def test_search_message_time_filter(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"][:1])
        google_gmail.set_messages(
            MOCK_DATA["mail_without_attachments"][1:],
            set_ts_to_now=True
        )
    
        action = AddEmailLabel(script_name=Constants.ADD_EMAIL_LABEL_SCRIPT_NAME)
        action.run()
    
>       assert len(gmail_script_session.request_history) == 3
E       assert 0 == 3
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243d0d2d0>.request_history

tests/add_email_label/test_add_email_label.py:252: AssertionError
tests/add_email_label/test_add_email_label.py::TestFilter::test_invalid_label
self = <gmail.tests.add_email_label.test_add_email_label.TestFilter object at 0x7f9243e04850>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243ea96d0>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243dbcf70>, _err=<_io.StringIO object at 0x7f9243dbdea0>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_INVALID_LABEL
    )
    def test_invalid_label(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
    
        action = AddEmailLabel(script_name=Constants.ADD_EMAIL_LABEL_SCRIPT_NAME)
        action.run()
    
>       assert len(gmail_script_session.request_history) == 4
E       assert 0 == 4
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243ea96d0>.request_history

tests/add_email_label/test_add_email_label.py:278: AssertionError
tests/delete_email/test_delete_email.py::TestDeleteEmailInvalidParams::test_without_params
self = <gmail.tests.delete_email.test_delete_email.TestDeleteEmailInvalidParams object at 0x7f9243d350d0>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243c06b50>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243dbcdc0>, _err=<_io.StringIO object at 0x7f9243dbe5f0>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG
    )
    def test_without_params(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput,
    ) -> None:
        action = init_async_action(
            DeleteEmail,
            script_name=Constants.DELETE_EMAIL_SCRIPT_NAME
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 1
E       assert 0 == 1
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243c06b50>.request_history

tests/delete_email/test_delete_email.py:133: AssertionError
tests/delete_email/test_delete_email.py::TestDeleteEmailInvalidParams::test_no_messages_deleted
self = <gmail.tests.delete_email.test_delete_email.TestDeleteEmailInvalidParams object at 0x7f9243d35d10>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243d1d610>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243dbe680>, _err=<_io.StringIO object at 0x7f9243dbeb90>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MAILBOXES
    )
    def test_no_messages_deleted(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput,
    ) -> None:
        action = init_async_action(
            DeleteEmail,
            script_name=Constants.DELETE_EMAIL_SCRIPT_NAME
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 1
E       assert 0 == 1
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243d1d610>.request_history

tests/delete_email/test_delete_email.py:158: AssertionError
tests/delete_email/test_delete_email.py::TestDeleteEmailInvalidParams::test_invalid_message_id
self = <gmail.tests.delete_email.test_delete_email.TestDeleteEmailInvalidParams object at 0x7f9243d362d0>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243da4410>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243dbf6d0>, _err=<_io.StringIO object at 0x7f9243dbf7f0>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MESSAGE_ID,
    )
    def test_invalid_message_id(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        action = init_async_action(
            DeleteEmail,
            script_name=Constants.DELETE_EMAIL_SCRIPT_NAME
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 1
E       assert 0 == 1
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243da4410>.request_history

tests/delete_email/test_delete_email.py:183: AssertionError
tests/delete_email/test_delete_email.py::TestDeleteEmailInvalidParams::test_delete_message_empty_filter
self = <gmail.tests.delete_email.test_delete_email.TestDeleteEmailInvalidParams object at 0x7f9243d36ad0>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243d71890>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243dbf2e0>, _err=<_io.StringIO object at 0x7f9243dbcc10>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_EMPTY_FILTER
    )
    def test_delete_message_empty_filter(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
    
        action = init_async_action(
            DeleteEmail,
            script_name=Constants.DELETE_EMAIL_SCRIPT_NAME
        )
        action.run()
    
        assert len(gmail_script_session.request_history) == 0
>       assert action_output.results == ActionOutput(
            output_message=F"{ERROR} {EMPTY_PARAMS_MESSAGE}",
            result_value=False,
            execution_state=ExecutionState.FAILED,
            json_output=None,
        )
E       assert ActionOutput(...bug_output='') == ActionOutput(...bug_output='')
E         
E         Omitting 4 identical items, use -vv to show
E         Differing attributes:
E         ['output_message']
E         
E         Drill down into differing attribute output_message:
E           output_message: 'Error executing action "Delete Email"\nReason: path \'\' doesn\'t match with any of the other \'GET\' routes patterns: [\'/computeMetadata/v1/instance/service-accounts/default/\', \'/computeMetadata/v1/instance/service-accounts/default/email\', \'/computeMetadata/v1/instance/service-accounts/\\\\w+@[a-zA-Z]+\\\\.com/token\']' != 'Error executing action "Delete Email"\nReason: configure the "Internet Message ID" parameter or one of the "Subject Filter", "Labels Filter", "Sender Filter", or "Time Frame (minutes)" parameters.'
E           Skipping 36 identical leading characters in diff, use -v to show
E             "
E           - Reason: configure the "Internet Message ID" parameter or one of the "Subject Filter", "Labels Filter", "Sender Filter", or "Time Frame (minutes)" parameters.
E           + Reason: path '' doesn't match with any of the other 'GET' routes patterns: ['/computeMetadata/v1/instance/service-accounts/default/', '/computeMetadata/v1/instance/service-accounts/default/email', '/computeMetadata/v1/instance/service-accounts/\\w+@[a-zA-Z]+\\.com/token']

tests/delete_email/test_delete_email.py:212: AssertionError
tests/delete_email/test_delete_email.py::TestDeleteEmailInvalidParams::test_no_mailbox_found
self = <gmail.tests.delete_email.test_delete_email.TestDeleteEmailInvalidParams object at 0x7f9243d37810>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243c31850>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243dbfe20>, _err=<_io.StringIO object at 0x7f9243dbff40>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_INVALID_MAILBOXES
    )
    def test_no_mailbox_found(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput,
    ) -> None:
        action = init_async_action(
            DeleteEmail,
            script_name=Constants.DELETE_EMAIL_SCRIPT_NAME,
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 1
E       assert 0 == 1
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243c31850>.request_history

tests/delete_email/test_delete_email.py:234: AssertionError
tests/delete_email/test_delete_email.py::TestDeleteEmailMessageId::test_delete_message_by_message_id
self = <gmail.tests.delete_email.test_delete_email.TestDeleteEmailMessageId object at 0x7f9243d2f2d0>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243d3c4d0>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243c6c550>, _err=<_io.StringIO object at 0x7f9243c6c4c0>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MESSAGE_ID
    )
    def test_delete_message_by_message_id(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
    
        action = init_async_action(
            DeleteEmail,
            script_name=Constants.DELETE_EMAIL_SCRIPT_NAME
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 2
E       assert 0 == 2
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243d3c4d0>.request_history

tests/delete_email/test_delete_email.py:266: AssertionError
tests/delete_email/test_delete_email.py::TestDeleteEmailMessageId::test_trash_message_by_message_id
self = <gmail.tests.delete_email.test_delete_email.TestDeleteEmailMessageId object at 0x7f9243d2f810>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243d55490>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f92447dc940>, _err=<_io.StringIO object at 0x7f9243c6c5e0>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_TRASH_AND_MESSAGE_ID
    )
    def test_trash_message_by_message_id(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
    
        action = init_async_action(
            DeleteEmail,
            script_name=Constants.DELETE_EMAIL_SCRIPT_NAME
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 2
E       assert 0 == 2
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243d55490>.request_history

tests/delete_email/test_delete_email.py:304: AssertionError
tests/delete_email/test_delete_email.py::TestDeleteEmailFilter::test_delete_message_valid_invalid_mailbox
self = <gmail.tests.delete_email.test_delete_email.TestDeleteEmailFilter object at 0x7f9243d35610>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f92445d1750>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243c6cd30>, _err=<_io.StringIO object at 0x7f9243c6d2d0>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MIXED_MAILBOXES
    )
    def test_delete_message_valid_invalid_mailbox(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
    
        action = init_async_action(
            DeleteEmail,
            script_name=Constants.DELETE_EMAIL_SCRIPT_NAME
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 4
E       assert 0 == 4
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f92445d1750>.request_history

tests/delete_email/test_delete_email.py:345: AssertionError
tests/delete_email/test_delete_email.py::TestDeleteEmailFilter::test_delete_message_time_filter
self = <gmail.tests.delete_email.test_delete_email.TestDeleteEmailFilter object at 0x7f9243d2eed0>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1782723838417'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243e415d0>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243c6d090>, _err=<_io.StringIO object at 0x7f9243c6d6c0>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_TIMEFRAME
    )
    def test_delete_message_time_filter(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"][:1])
        google_gmail.set_messages(
            MOCK_DATA["mail_without_attachments"][1:],
            set_ts_to_now=True
        )
    
        action = init_async_action(
            DeleteEmail,
            script_name=Constants.DELETE_EMAIL_SCRIPT_NAME
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 2
E       assert 0 == 2
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243e415d0>.request_history

tests/delete_email/test_delete_email.py:394: AssertionError
tests/delete_email/test_delete_email.py::TestAsyncTimeout::test_delete_timeout
self = <gmail.tests.delete_email.test_delete_email.TestAsyncTimeout object at 0x7f9243d2fcd0>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243effa90>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243c6d7e0>, _err=<_io.StringIO object at 0x7f9243c6c430>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MESSAGE_ID
    )
    def test_delete_timeout(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        action = init_async_action(
            DeleteEmail,
            script_name=Constants.DELETE_EMAIL_SCRIPT_NAME,
            async_timeout_ms=1
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 1
E       assert 0 == 1
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243effa90>.request_history

tests/delete_email/test_delete_email.py:432: AssertionError
tests/forward_email/test_forward_email.py::TestAuth::test_invalid_email
self = <gmail.tests.forward_email.test_forward_email.TestAuth object at 0x7f9243e7b110>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243ebec90>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243c6da20>, _err=<_io.StringIO object at 0x7f9243c6de10>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG
    )
    def test_invalid_email(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput,
    ) -> None:
        ForwardEmail(script_name=Constants.FORWARD_EMAIL_SCRIPT_NAME).run()
    
>       assert len(gmail_script_session.request_history) == 1
E       assert 0 == 1
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243ebec90>.request_history

tests/forward_email/test_forward_email.py:133: AssertionError
tests/forward_email/test_forward_email.py::TestForwardEmail::test_with_no_params
self = <gmail.tests.forward_email.test_forward_email.TestForwardEmail object at 0x7f9243e7a010>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243ec7450>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243c6c940>, _err=<_io.StringIO object at 0x7f9243c6c700>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MESSAGE_ID
    )
    def test_with_no_params(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
        action = ForwardEmail(script_name=Constants.FORWARD_EMAIL_SCRIPT_NAME)
        action.run()
    
>       assert len(gmail_script_session.request_history) == 5
E       assert 0 == 5
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243ec7450>.request_history

tests/forward_email/test_forward_email.py:158: AssertionError
tests/forward_email/test_forward_email.py::TestForwardEmail::test_with_csv_reply_to
self = <gmail.tests.forward_email.test_forward_email.TestForwardEmail object at 0x7f9243e797d0>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243dd3bd0>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243c6e8c0>, _err=<_io.StringIO object at 0x7f9243c6eb90>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_COMMA_SEPARATED_PARAMS
    )
    def test_with_csv_reply_to(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
        action = ForwardEmail(script_name=Constants.FORWARD_EMAIL_SCRIPT_NAME)
        action.run()
    
>       assert len(gmail_script_session.request_history) == 5
E       assert 0 == 5
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243dd3bd0>.request_history

tests/forward_email/test_forward_email.py:186: AssertionError
tests/forward_email/test_forward_email.py::TestForwardEmail::test_with_attachments
self = <gmail.tests.forward_email.test_forward_email.TestForwardEmail object at 0x7f9243e7a250>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243edd150>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243c6c430>, _err=<_io.StringIO object at 0x7f9243c6eef0>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_ATTACHMENTS
    )
    def test_with_attachments(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
        action = ForwardEmail(script_name=Constants.FORWARD_EMAIL_SCRIPT_NAME)
        action.run()
        delete_test_attachments(ACTION_CONFIG_WITH_ATTACHMENTS["Attachments Paths"])
    
>       assert len(gmail_script_session.request_history) == 5
E       assert 0 == 5
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243edd150>.request_history

tests/forward_email/test_forward_email.py:215: AssertionError
tests/forward_email/test_forward_email.py::TestForwardEmail::test_with_attachments_in_original_email
self = <gmail.tests.forward_email.test_forward_email.TestForwardEmail object at 0x7f9243e78b10>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...FVTOkNPTkZJUk1FRA0KU1VNTUFSWTpUZXN0IEdtYWlsDQpUUkFOU1A6T1BBUVVFDQpFTkQ6VkVWRU5UDQpFTkQ6VkNBTEVOREFSDQo='}}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243d9b210>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243c6f130>, _err=<_io.StringIO object at 0x7f9243c6f520>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_EMAIL_WITH_ATTACHMENTS
    )
    def test_with_attachments_in_original_email(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(
            MOCK_DATA["mail_without_attachments"] + MOCK_DATA["mail_with_eml"]
        )
        google_gmail.set_attachments(MOCK_DATA["attachments"])
        action = ForwardEmail(script_name=Constants.FORWARD_EMAIL_SCRIPT_NAME)
        action.run()
    
>       assert len(gmail_script_session.request_history) == 7
E       assert 0 == 7
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243d9b210>.request_history

tests/forward_email/test_forward_email.py:246: AssertionError
tests/remove_email_label/test_remove_email_label.py::TestInvalidParams::test_without_params
self = <gmail.tests.remove_email_label.test_remove_email_label.TestInvalidParams object at 0x7f9243d61b10>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243dfed50>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243c6ecb0>, _err=<_io.StringIO object at 0x7f9243c6f490>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG
    )
    def test_without_params(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput,
    ) -> None:
        action = RemoveEmailLabel(script_name=Constants.REMOVE_EMAIL_LABEL_SCRIPT_NAME)
        action.run()
    
>       assert len(gmail_script_session.request_history) == 2
E       assert 0 == 2
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243dfed50>.request_history

tests/remove_email_label/test_remove_email_label.py:120: AssertionError
tests/remove_email_label/test_remove_email_label.py::TestInvalidParams::test_invalid_message_id
self = <gmail.tests.remove_email_label.test_remove_email_label.TestInvalidParams object at 0x7f9243d61e90>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243cac610>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243c6f910>, _err=<_io.StringIO object at 0x7f9243c6fa30>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MESSAGE_ID
    )
    def test_invalid_message_id(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        action = RemoveEmailLabel(script_name=Constants.REMOVE_EMAIL_LABEL_SCRIPT_NAME)
        action.run()
    
>       assert len(gmail_script_session.request_history) == 2
E       assert 0 == 2
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243cac610>.request_history

tests/remove_email_label/test_remove_email_label.py:145: AssertionError
tests/remove_email_label/test_remove_email_label.py::TestMessageID::test_search_message_by_message_id
self = <gmail.tests.remove_email_label.test_remove_email_label.TestMessageID object at 0x7f9243d60290>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243c51290>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243cccdc0>, _err=<_io.StringIO object at 0x7f9243cccd30>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MESSAGE_ID
    )
    def test_search_message_by_message_id(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
    
        action = RemoveEmailLabel(script_name=Constants.REMOVE_EMAIL_LABEL_SCRIPT_NAME)
        action.run()
    
>       assert len(gmail_script_session.request_history) == 3
E       assert 0 == 3
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243c51290>.request_history

tests/remove_email_label/test_remove_email_label.py:175: AssertionError
tests/remove_email_label/test_remove_email_label.py::TestFilter::test_search_message_default_filter
self = <gmail.tests.remove_email_label.test_remove_email_label.TestFilter object at 0x7f9243d63250>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243cdfe90>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f92447dcca0>, _err=<_io.StringIO object at 0x7f9243dbcc10>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MAILBOXES
    )
    def test_search_message_default_filter(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
    
        action = RemoveEmailLabel(script_name=Constants.REMOVE_EMAIL_LABEL_SCRIPT_NAME)
        action.run()
    
>       assert len(gmail_script_session.request_history) == 3
E       assert 0 == 3
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243cdfe90>.request_history

tests/remove_email_label/test_remove_email_label.py:203: AssertionError
tests/remove_email_label/test_remove_email_label.py::TestFilter::test_search_message_empty_filter
self = <gmail.tests.remove_email_label.test_remove_email_label.TestFilter object at 0x7f9243d4c750>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243cdfcd0>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243dbcf70>, _err=<_io.StringIO object at 0x7f9243dbfc70>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_EMPTY_FILTER
    )
    def test_search_message_empty_filter(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
    
        action = RemoveEmailLabel(script_name=Constants.REMOVE_EMAIL_LABEL_SCRIPT_NAME)
        action.run()
    
        assert len(gmail_script_session.request_history) == 0
>       assert action_output.results == ActionOutput(
            output_message=F"{ERROR} {EMPTY_PARAMS_MESSAGE}",
            result_value=False,
            execution_state=ExecutionState.FAILED,
            json_output=None,
        )
E       assert ActionOutput(...bug_output='') == ActionOutput(...bug_output='')
E         
E         Omitting 4 identical items, use -vv to show
E         Differing attributes:
E         ['output_message']
E         
E         Drill down into differing attribute output_message:
E           output_message: 'Error executing action "Remove Email Label"\nReason: path \'\' doesn\'t match with any of the other \'GET\' routes patterns: [\'/computeMetadata/v1/instance/service-accounts/default/\', \'/computeMetadata/v1/instance/service-accounts/default/email\', \'/computeMetadata/v1/instance/service-accounts/\\\\w+@[a-zA-Z]+\\\\.com/token\']' != 'Error executing action "Remove Email Label"\nReason: configure the "Internet Message ID" parameter or one of the "Subject Filter", "Labels Filter", "Sender Filter", or "Time Frame (minutes)" parameters.'
E           Skipping 42 identical leading characters in diff, use -v to show
E             "
E           - Reason: configure the "Internet Message ID" parameter or one of the "Subject Filter", "Labels Filter", "Sender Filter", or "Time Frame (minutes)" parameters.
E           + Reason: path '' doesn't match with any of the other 'GET' routes patterns: ['/computeMetadata/v1/instance/service-accounts/default/', '/computeMetadata/v1/instance/service-accounts/default/email', '/computeMetadata/v1/instance/service-accounts/\\w+@[a-zA-Z]+\\.com/token']

tests/remove_email_label/test_remove_email_label.py:230: AssertionError
tests/remove_email_label/test_remove_email_label.py::TestFilter::test_search_message_time_filter
self = <gmail.tests.remove_email_label.test_remove_email_label.TestFilter object at 0x7f9243d4c610>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1782723839153'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243cd4cd0>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243c6f760>, _err=<_io.StringIO object at 0x7f9243c6ecb0>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_TIMEFRAME
    )
    def test_search_message_time_filter(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"][:1])
        google_gmail.set_messages(
            MOCK_DATA["mail_without_attachments"][1:],
            set_ts_to_now=True
        )
    
        action = RemoveEmailLabel(script_name=Constants.REMOVE_EMAIL_LABEL_SCRIPT_NAME)
        action.run()
    
>       assert len(gmail_script_session.request_history) == 3
E       assert 0 == 3
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243cd4cd0>.request_history

tests/remove_email_label/test_remove_email_label.py:256: AssertionError
tests/remove_email_label/test_remove_email_label.py::TestFilter::test_invalid_label
self = <gmail.tests.remove_email_label.test_remove_email_label.TestFilter object at 0x7f9243d4cd50>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243e3c390>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243e869e0>, _err=<_io.StringIO object at 0x7f9243dbf880>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_INVALID_LABEL
    )
    def test_invalid_label(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
    
        action = RemoveEmailLabel(script_name=Constants.REMOVE_EMAIL_LABEL_SCRIPT_NAME)
        action.run()
    
>       assert len(gmail_script_session.request_history) == 1
E       assert 0 == 1
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243e3c390>.request_history

tests/remove_email_label/test_remove_email_label.py:282: AssertionError
tests/remove_email_label/test_remove_email_label.py::TestFilter::test_mixed_labels
self = <gmail.tests.remove_email_label.test_remove_email_label.TestFilter object at 0x7f9243d4d3d0>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243d71510>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243ccd1b0>, _err=<_io.StringIO object at 0x7f9243ccd480>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MIXED_LABELS
    )
    def test_mixed_labels(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
    
        action = RemoveEmailLabel(script_name=Constants.REMOVE_EMAIL_LABEL_SCRIPT_NAME)
        action.run()
    
>       assert len(gmail_script_session.request_history) == 3
E       assert 0 == 3
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243d71510>.request_history

tests/remove_email_label/test_remove_email_label.py:306: AssertionError
tests/save_email_to_the_case/test_save_email_to_the_case.py::TestAuth::test_invalid_email
self = <gmail.tests.save_email_to_the_case.test_save_email_to_the_case.TestAuth object at 0x7f9243dc0f90>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243c1ab10>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243ccdab0>, _err=<_io.StringIO object at 0x7f9243ccda20>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG
    )
    def test_invalid_email(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput,
    ) -> None:
        SaveEmailToTheCase(script_name=Constants.SAVE_EMAIL_TO_THE_CASE).run()
    
>       assert len(gmail_script_session.request_history) == 1
E       assert 0 == 1
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243c1ab10>.request_history

tests/save_email_to_the_case/test_save_email_to_the_case.py:125: AssertionError
tests/save_email_to_the_case/test_save_email_to_the_case.py::TestSaveEmail::test_with_no_params
self = <gmail.tests.save_email_to_the_case.test_save_email_to_the_case.TestSaveEmail object at 0x7f9243dc23d0>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_sync_session = <gmail.tests.core.session.GoogleGmailSession object at 0x7f9243e6e9d0>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243db6290>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243cce0e0>, _err=<_io.StringIO object at 0x7f9243cce200>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MESSAGE_ID
    )
    def test_with_no_params(
            self,
            google_gmail: GoogleGmail,
            gmail_sync_session: GoogleGmailSession,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
        action = SaveEmailToTheCase(script_name=Constants.SAVE_EMAIL_TO_THE_CASE)
        action.soar_action.session = gmail_sync_session
        action.run()
    
>       assert len(gmail_script_session.request_history) == 3
E       assert 0 == 3
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243db6290>.request_history

tests/save_email_to_the_case/test_save_email_to_the_case.py:152: AssertionError
tests/save_email_to_the_case/test_save_email_to_the_case.py::TestSaveEmail::test_with_base64_encode
self = <gmail.tests.save_email_to_the_case.test_save_email_to_the_case.TestSaveEmail object at 0x7f9243dc1610>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_sync_session = <gmail.tests.core.session.GoogleGmailSession object at 0x7f9243e6d890>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243d0b310>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243ccdea0>, _err=<_io.StringIO object at 0x7f9243ccf490>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_BASE64_ENCODE
    )
    def test_with_base64_encode(
            self,
            google_gmail: GoogleGmail,
            gmail_sync_session: GoogleGmailSession,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
        action = SaveEmailToTheCase(script_name=Constants.SAVE_EMAIL_TO_THE_CASE)
        action.soar_action.session = gmail_sync_session
        action.run()
    
>       assert len(gmail_script_session.request_history) == 3
E       assert 0 == 3
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243d0b310>.request_history

tests/save_email_to_the_case/test_save_email_to_the_case.py:183: AssertionError
tests/save_email_to_the_case/test_save_email_to_the_case.py::TestSaveEmail::test_with_attachments_filtered
self = <gmail.tests.save_email_to_the_case.test_save_email_to_the_case.TestSaveEmail object at 0x7f9243dc1f50>
google_gmail = GoogleGmail(messages={'190ee8f88c8a5f34': {'id': '190ee8f88c8a5f34', 'threadId': '190ee8f88c8a5f34', 'labelIds': ['CAT...FVTOkNPTkZJUk1FRA0KU1VNTUFSWTpUZXN0IEdtYWlsDQpUUkFOU1A6T1BBUVVFDQpFTkQ6VkVWRU5UDQpFTkQ6VkNBTEVOREFSDQo='}}, threads={})
gmail_sync_session = <gmail.tests.core.session.GoogleGmailSession object at 0x7f9243ffff50>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243ec61d0>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243ccfb50>, _err=<_io.StringIO object at 0x7f9243ccf760>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_ATTACHMENTS_FILTERED
    )
    def test_with_attachments_filtered(
            self,
            google_gmail: GoogleGmail,
            gmail_sync_session: GoogleGmailSession,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_with_files"])
        google_gmail.set_attachments(MOCK_DATA["attachments"])
        action = SaveEmailToTheCase(script_name=Constants.SAVE_EMAIL_TO_THE_CASE)
        action.soar_action.session = gmail_sync_session
        action.run()
    
>       assert len(gmail_script_session.request_history) == 4
E       assert 0 == 4
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243ec61d0>.request_history

tests/save_email_to_the_case/test_save_email_to_the_case.py:215: AssertionError
tests/save_email_to_the_case/test_save_email_to_the_case.py::TestSaveEmail::test_with_attachments
self = <gmail.tests.save_email_to_the_case.test_save_email_to_the_case.TestSaveEmail object at 0x7f9243dc2690>
google_gmail = GoogleGmail(messages={'190ee8f88c8a5f34': {'id': '190ee8f88c8a5f34', 'threadId': '190ee8f88c8a5f34', 'labelIds': ['CAT...FVTOkNPTkZJUk1FRA0KU1VNTUFSWTpUZXN0IEdtYWlsDQpUUkFOU1A6T1BBUVVFDQpFTkQ6VkVWRU5UDQpFTkQ6VkNBTEVOREFSDQo='}}, threads={})
gmail_sync_session = <gmail.tests.core.session.GoogleGmailSession object at 0x7f9243cf52d0>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243e91590>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243ccf880>, _err=<_io.StringIO object at 0x7f9243ccfac0>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_ATTACHMENTS
    )
    def test_with_attachments(
            self,
            google_gmail: GoogleGmail,
            gmail_sync_session: GoogleGmailSession,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_with_files"])
        google_gmail.set_attachments(MOCK_DATA["attachments"])
        action = SaveEmailToTheCase(script_name=Constants.SAVE_EMAIL_TO_THE_CASE)
        action.soar_action.session = gmail_sync_session
        action.run()
    
>       assert len(gmail_script_session.request_history) == 4
E       assert 0 == 4
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243e91590>.request_history

tests/save_email_to_the_case/test_save_email_to_the_case.py:250: AssertionError
tests/save_email_to_the_case/test_save_email_to_the_case.py::TestSaveEmail::test_with_attachments_and_encode
self = <gmail.tests.save_email_to_the_case.test_save_email_to_the_case.TestSaveEmail object at 0x7f9243dc2f90>
google_gmail = GoogleGmail(messages={'190ee8f88c8a5f34': {'id': '190ee8f88c8a5f34', 'threadId': '190ee8f88c8a5f34', 'labelIds': ['CAT...FVTOkNPTkZJUk1FRA0KU1VNTUFSWTpUZXN0IEdtYWlsDQpUUkFOU1A6T1BBUVVFDQpFTkQ6VkVWRU5UDQpFTkQ6VkNBTEVOREFSDQo='}}, threads={})
gmail_sync_session = <gmail.tests.core.session.GoogleGmailSession object at 0x7f9243ccafd0>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243cac590>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243ccfa30>, _err=<_io.StringIO object at 0x7f9243ccf640>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_ATTACHMENTS_AND_ENCODE
    )
    def test_with_attachments_and_encode(
            self,
            google_gmail: GoogleGmail,
            gmail_sync_session: GoogleGmailSession,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_with_files"])
        google_gmail.set_attachments(MOCK_DATA["attachments"])
        action = SaveEmailToTheCase(script_name=Constants.SAVE_EMAIL_TO_THE_CASE)
        action.soar_action.session = gmail_sync_session
        action.run()
    
>       assert len(gmail_script_session.request_history) == 5
E       assert 0 == 5
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243cac590>.request_history

tests/save_email_to_the_case/test_save_email_to_the_case.py:287: AssertionError
tests/search_for_emails/test_search_for_emails.py::TestInvalidParams::test_without_params
self = <gmail.tests.search_for_emails.test_search_for_emails.TestInvalidParams object at 0x7f9243d574d0>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243cd96d0>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243c6f520>, _err=<_io.StringIO object at 0x7f9243b085e0>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG
    )
    def test_without_params(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput,
    ) -> None:
        action = init_async_action(
            SearchForEmails,
            script_name=Constants.SEARCH_FOR_EMAILS_SCRIPT_NAME,
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 1
E       assert 0 == 1
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243cd96d0>.request_history

tests/search_for_emails/test_search_for_emails.py:125: AssertionError
tests/search_for_emails/test_search_for_emails.py::TestInvalidParams::test_no_messages_found
self = <gmail.tests.search_for_emails.test_search_for_emails.TestInvalidParams object at 0x7f9243d579d0>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243b45210>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243ccfc70>, _err=<_io.StringIO object at 0x7f9243ccf640>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MAILBOXES
    )
    def test_no_messages_found(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput,
    ) -> None:
        action = init_async_action(
            SearchForEmails,
            script_name=Constants.SEARCH_FOR_EMAILS_SCRIPT_NAME,
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 1
E       assert 0 == 1
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243b45210>.request_history

tests/search_for_emails/test_search_for_emails.py:150: AssertionError
tests/search_for_emails/test_search_for_emails.py::TestInvalidParams::test_no_mailbox_found
self = <gmail.tests.search_for_emails.test_search_for_emails.TestInvalidParams object at 0x7f9243d54a90>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243cf8fd0>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243b09480>, _err=<_io.StringIO object at 0x7f9243b09240>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_INVALID_MAILBOXES
    )
    def test_no_mailbox_found(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput,
    ) -> None:
        action = init_async_action(
            SearchForEmails,
            script_name=Constants.SEARCH_FOR_EMAILS_SCRIPT_NAME,
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 1
E       assert 0 == 1
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243cf8fd0>.request_history

tests/search_for_emails/test_search_for_emails.py:175: AssertionError
tests/search_for_emails/test_search_for_emails.py::TestInvalidParams::test_invalid_message_id
self = <gmail.tests.search_for_emails.test_search_for_emails.TestInvalidParams object at 0x7f9243d555d0>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243c30750>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243b09b40>, _err=<_io.StringIO object at 0x7f9243b09900>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MESSAGE_ID
    )
    def test_invalid_message_id(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        action = init_async_action(
            SearchForEmails,
            script_name=Constants.SEARCH_FOR_EMAILS_SCRIPT_NAME,
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 1
E       assert 0 == 1
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243c30750>.request_history

tests/search_for_emails/test_search_for_emails.py:199: AssertionError
tests/search_for_emails/test_search_for_emails.py::TestMessageID::test_search_message_by_message_id
self = <gmail.tests.search_for_emails.test_search_for_emails.TestMessageID object at 0x7f9243d55990>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243d62e50>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243ccf880>, _err=<_io.StringIO object at 0x7f9243ccf640>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MESSAGE_ID
    )
    def test_search_message_by_message_id(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
    
        action = init_async_action(
            SearchForEmails,
            script_name=Constants.SEARCH_FOR_EMAILS_SCRIPT_NAME,
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 2
E       assert 0 == 2
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243d62e50>.request_history

tests/search_for_emails/test_search_for_emails.py:229: AssertionError
tests/search_for_emails/test_search_for_emails.py::TestFilter::test_search_message_empty_filter
self = <gmail.tests.search_for_emails.test_search_for_emails.TestFilter object at 0x7f9243ef6f90>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243ed2610>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243b0a440>, _err=<_io.StringIO object at 0x7f9243b0a200>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MAILBOXES
    )
    def test_search_message_empty_filter(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
    
        action = init_async_action(
            SearchForEmails,
            script_name=Constants.SEARCH_FOR_EMAILS_SCRIPT_NAME,
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 3
E       assert 0 == 3
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243ed2610>.request_history

tests/search_for_emails/test_search_for_emails.py:261: AssertionError
tests/search_for_emails/test_search_for_emails.py::TestFilter::test_search_message_valid_invalid_mailbox
self = <gmail.tests.search_for_emails.test_search_for_emails.TestFilter object at 0x7f9243ef7ed0>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243c40590>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243b0ab00>, _err=<_io.StringIO object at 0x7f9243b09360>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MIXED_MAILBOXES
    )
    def test_search_message_valid_invalid_mailbox(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
    
        action = init_async_action(
            SearchForEmails,
            script_name=Constants.SEARCH_FOR_EMAILS_SCRIPT_NAME,
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 4
E       assert 0 == 4
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243c40590>.request_history

tests/search_for_emails/test_search_for_emails.py:291: AssertionError
tests/search_for_emails/test_search_for_emails.py::TestFilter::test_search_message_time_filter
self = <gmail.tests.search_for_emails.test_search_for_emails.TestFilter object at 0x7f9243d55ed0>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1782723839656'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243b89350>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243ccfa30>, _err=<_io.StringIO object at 0x7f9243b0a320>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_TIMEFRAME
    )
    def test_search_message_time_filter(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"][:1])
        google_gmail.set_messages(
            MOCK_DATA["mail_without_attachments"][1:],
            set_ts_to_now=True
        )
    
        action = init_async_action(
            SearchForEmails,
            script_name=Constants.SEARCH_FOR_EMAILS_SCRIPT_NAME,
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 2
E       assert 0 == 2
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243b89350>.request_history

tests/search_for_emails/test_search_for_emails.py:327: AssertionError
tests/search_for_emails/test_search_for_emails.py::TestAsyncTimeout::test_search_timeout
self = <gmail.tests.search_for_emails.test_search_for_emails.TestAsyncTimeout object at 0x7f9243ef6a90>
google_gmail = GoogleGmail(messages={}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243d3c590>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243b0b490>, _err=<_io.StringIO object at 0x7f9243b0b370>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MESSAGE_ID
    )
    def test_search_timeout(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        action = init_async_action(
            SearchForEmails,
            script_name=Constants.SEARCH_FOR_EMAILS_SCRIPT_NAME,
            async_timeout_ms=1
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 1
E       assert 0 == 1
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243d3c590>.request_history

tests/search_for_emails/test_search_for_emails.py:358: AssertionError
tests/send_email/test_send_email.py::TestSendEmailAuth::test_invalid_email
self = <gmail.tests.send_email.test_send_email.TestSendEmailAuth object at 0x7f9243db6110>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243fd0e50>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243b0a440>, _err=<_io.StringIO object at 0x7f9243b0a8c0>)

    @set_metadata(
        integration_config=CONFIG_WITH_INVALID_EMAIL,
        parameters=ACTION_CONFIG
    )
    def test_invalid_email(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput,
    ) -> None:
        SendEmail(script_name=Constants.SEND_EMAIL_SCRIPT_NAME).run()
    
        assert len(gmail_script_session.request_history) == 0
>       assert (
            INVALID_EMAIL_OUTPUT_MESSAGE in action_output.results.output_message
        )
E       assert 'Failed to send email!\nReason: Impersonation is not allowed for the provided service account. Please check the "Service Account Token Creator" role to the service account: ' in "Failed to send email!\nReason: path '' doesn't match with any of the other 'GET' routes patterns: ['/computeMetadata/...tance/service-accounts/default/email', '/computeMetadata/v1/instance/service-accounts/\\\\w+@[a-zA-Z]+\\\\.com/token']"
E        +  where "Failed to send email!\nReason: path '' doesn't match with any of the other 'GET' routes patterns: ['/computeMetadata/...tance/service-accounts/default/email', '/computeMetadata/v1/instance/service-accounts/\\\\w+@[a-zA-Z]+\\\\.com/token']" = ActionOutput(output_message="Failed to send email!\nReason: path '' doesn't match with any of the other 'GET' routes p...]+\\\\.com/token']", result_value=False, execution_state=<ExecutionState.FAILED: 2>, json_output=None, debug_output='').output_message
E        +    where ActionOutput(output_message="Failed to send email!\nReason: path '' doesn't match with any of the other 'GET' routes p...]+\\\\.com/token']", result_value=False, execution_state=<ExecutionState.FAILED: 2>, json_output=None, debug_output='') = MockActionOutput(_out=<_io.StringIO object at 0x7f9243b0a440>, _err=<_io.StringIO object at 0x7f9243b0a8c0>).results

tests/send_email/test_send_email.py:130: AssertionError
tests/send_email/test_send_email.py::TestSendEmail::test_send_email_with_mandatory_params
self = <gmail.tests.send_email.test_send_email.TestSendEmail object at 0x7f9243db4190>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243b95050>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243b0be20>, _err=<_io.StringIO object at 0x7f9243b0b370>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG
    )
    def test_send_email_with_mandatory_params(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
        action = SendEmail(script_name=Constants.SEND_EMAIL_SCRIPT_NAME)
        action.run()
    
>       assert len(gmail_script_session.request_history) == 3
E       assert 0 == 3
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243b95050>.request_history

tests/send_email/test_send_email.py:153: AssertionError
tests/send_email/test_send_email.py::TestSendEmail::test_send_email_with_all_params
self = <gmail.tests.send_email.test_send_email.TestSendEmail object at 0x7f9243db5d50>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243e3f890>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243ba4940>, _err=<_io.StringIO object at 0x7f9243ba4af0>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_ALL_PARAMS
    )
    def test_send_email_with_all_params(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
        action = SendEmail(script_name=Constants.SEND_EMAIL_SCRIPT_NAME)
        action.run()
    
>       assert len(gmail_script_session.request_history) == 3
E       assert 0 == 3
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243e3f890>.request_history

tests/send_email/test_send_email.py:176: AssertionError
tests/send_email/test_send_email.py::TestSendEmail::test_send_email_with_comma_separated_params
self = <gmail.tests.send_email.test_send_email.TestSendEmail object at 0x7f9243db4e50>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243b42010>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243ba4ca0>, _err=<_io.StringIO object at 0x7f9243ba4dc0>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_COMMA_SEPARATED_PARAMS
    )
    def test_send_email_with_comma_separated_params(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
        action = SendEmail(script_name=Constants.SEND_EMAIL_SCRIPT_NAME)
        action.run()
    
>       assert len(gmail_script_session.request_history) == 3
E       assert 0 == 3
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243b42010>.request_history

tests/send_email/test_send_email.py:199: AssertionError
tests/send_email/test_send_email.py::TestSendEmail::test_send_email_with_attachments
self = <gmail.tests.send_email.test_send_email.TestSendEmail object at 0x7f9243db59d0>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243bb9ed0>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243ba5480>, _err=<_io.StringIO object at 0x7f9243ba4c10>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_ATTACHMENTS
    )
    def test_send_email_with_attachments(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
        action = SendEmail(script_name=Constants.SEND_EMAIL_SCRIPT_NAME)
        action.run()
        delete_test_attachments(ACTION_CONFIG_WITH_ATTACHMENTS["Attachments Paths"])
    
>       assert len(gmail_script_session.request_history) == 3
E       assert 0 == 3
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243bb9ed0>.request_history

tests/send_email/test_send_email.py:223: AssertionError
tests/send_thread_reply/test_send_thread_reply.py::TestAuth::test_invalid_email
self = <gmail.tests.send_thread_reply.test_send_thread_reply.TestAuth object at 0x7f9243ea8650>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243bd0f50>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243ba56c0>, _err=<_io.StringIO object at 0x7f9243ba5090>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG
    )
    def test_invalid_email(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput,
    ) -> None:
        SendThreadReply(script_name=Constants.SEND_THREAD_REPLY_SCRIPT_NAME).run()
    
>       assert len(gmail_script_session.request_history) == 1
E       assert 0 == 1
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243bd0f50>.request_history

tests/send_thread_reply/test_send_thread_reply.py:127: AssertionError
tests/send_thread_reply/test_send_thread_reply.py::TestSendEmail::test_with_no_params
self = <gmail.tests.send_thread_reply.test_send_thread_reply.TestSendEmail object at 0x7f9243ea8c10>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243bb7450>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243ba53f0>, _err=<_io.StringIO object at 0x7f9243ba57e0>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MESSAGE_ID
    )
    def test_with_no_params(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
        action = SendThreadReply(script_name=Constants.SEND_THREAD_REPLY_SCRIPT_NAME)
        action.run()
    
>       assert len(gmail_script_session.request_history) == 4
E       assert 0 == 4
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243bb7450>.request_history

tests/send_thread_reply/test_send_thread_reply.py:152: AssertionError
tests/send_thread_reply/test_send_thread_reply.py::TestSendEmail::test_with_csv_reply_to
self = <gmail.tests.send_thread_reply.test_send_thread_reply.TestSendEmail object at 0x7f9243eab450>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243e98350>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243ba6950>, _err=<_io.StringIO object at 0x7f9243ba6a70>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_COMMA_SEPARATED_PARAMS
    )
    def test_with_csv_reply_to(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
        action = SendThreadReply(script_name=Constants.SEND_THREAD_REPLY_SCRIPT_NAME)
        action.run()
    
>       assert len(gmail_script_session.request_history) == 4
E       assert 0 == 4
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243e98350>.request_history

tests/send_thread_reply/test_send_thread_reply.py:180: AssertionError
tests/send_thread_reply/test_send_thread_reply.py::TestSendEmail::test_with_attachments
self = <gmail.tests.send_thread_reply.test_send_thread_reply.TestSendEmail object at 0x7f9243eaa450>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}}, attachments={}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243b95510>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243ba4f70>, _err=<_io.StringIO object at 0x7f9243ba6dd0>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_ATTACHMENTS
    )
    def test_with_attachments(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
        action = SendThreadReply(script_name=Constants.SEND_THREAD_REPLY_SCRIPT_NAME)
        action.run()
        delete_test_attachments(ACTION_CONFIG_WITH_ATTACHMENTS["Attachments Paths"])
    
>       assert len(gmail_script_session.request_history) == 4
E       assert 0 == 4
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243b95510>.request_history

tests/send_thread_reply/test_send_thread_reply.py:209: AssertionError
tests/send_thread_reply/test_send_thread_reply.py::TestSendEmail::test_with_attachments_in_original_email
self = <gmail.tests.send_thread_reply.test_send_thread_reply.TestSendEmail object at 0x7f9243eaa150>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...FVTOkNPTkZJUk1FRA0KU1VNTUFSWTpUZXN0IEdtYWlsDQpUUkFOU1A6T1BBUVVFDQpFTkQ6VkVWRU5UDQpFTkQ6VkNBTEVOREFSDQo='}}, threads={})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243b5a550>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243ba67a0>, _err=<_io.StringIO object at 0x7f9243ba72e0>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_EMAIL_WITH_ATTACHMENTS
    )
    def test_with_attachments_in_original_email(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(
            MOCK_DATA["mail_without_attachments"] + MOCK_DATA["mail_with_files"]
        )
        google_gmail.set_attachments(MOCK_DATA["attachments"])
        action = SendThreadReply(script_name=Constants.SEND_THREAD_REPLY_SCRIPT_NAME)
        action.run()
    
>       assert len(gmail_script_session.request_history) == 6
E       assert 0 == 6
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243b5a550>.request_history

tests/send_thread_reply/test_send_thread_reply.py:240: AssertionError
tests/test_google_gmail_connector.py::TestTestRun::test_connector_test_run_no_mail
self = <gmail.connectors.GmailConnector.GoogleGmailConnector object at 0x7f9243b8efd0>

    @async_output_handler
    async def start(self) -> None:
        """
        Executes the connector logic.
    
        Execution steps:
    
            1. Extracting connector script parameters from the SDK connector object
            2. Validate parameters values
            3. Loading the connector context data via the SDK connector object
            4. Initializing the integrations manager(s)
            5. Fetching & parsing alerts from the product via integration manager
            6. Filtering the alerts
            7. Processing the filtered alerts into siemplify alerts
            8. Saving connector context data via the SDK connector object
            9. Sending newly created siemplify alerts to the platform
    
        Raises:
            ConnectorSetupError: if any of the pre-processing phases fail
        """
        self.logger.info(
            f'---------------- Starting connector {self.script_name} '
            'execution ----------------'
        )
        if self.is_test_run:
            self.logger.info(
                '****** This is an \"IDE Play Button\"\\\"Run Connector once\" '
                'test run ******'
            )
    
        self.logger.info(
            '------------------- Main - Param Init -------------------'
        )
        self.extract_params()
        self.logger.info(
            '------------------- Main - Started -------------------'
        )
        processed_alerts = []
    
        try:
            try:
                self.validate_params_wrapper()
                self.read_context_wrapper()
                self.logger.info('Initializing managers...')
>               self.init_managers()

.venv/lib/python3.11/site-packages/TIPCommon/base/connector/async_connector.py:537: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
connectors/GmailConnector.py:93: in init_managers
    auth_manager = build_auth_manager(
core/GoogleGmailAuth.py:90: in build_auth_manager
    return GoogleGmailAuthManager(
core/GoogleGmailAuth.py:112: in __init__
    self.credentials = build_workspace_credentials(
core/GoogleGmailUtils.py:355: in build_workspace_credentials
    adc_creds = get_adc()[0]
                ^^^^^^^^^
.venv/lib/python3.11/site-packages/TIPCommon/rest/auth.py:158: in get_adc
    return google.auth.default(scopes, request, quota_project_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/_default.py:714: in default
    credentials, project_id = checker()
                              ^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/_default.py:710: in <lambda>
    lambda: _get_gce_credentials(request, quota_project_id=quota_project_id),
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/_default.py:406: in _get_gce_credentials
    if _metadata.is_on_gce(request=request):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/compute_engine/_metadata.py:138: in is_on_gce
    if ping(request):
       ^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/compute_engine/_metadata.py:221: in ping
    response = request(
.venv/lib/python3.11/site-packages/google/auth/transport/requests.py:188: in __call__
    response = self.session.request(
tests/conftest.py:214: in mock_session_request
    return session.request(method, url, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/integration_testing/requests/session.py:89: in request
    response: MockResponse = self._do_request(method, request)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/integration_testing/requests/session.py:125: in _do_request
    self._validate_response(response, method, path)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <gmail.tests.core.session.GoogleGmailSession object at 0x7f9243c05450>
response = <object object at 0x7f9248d859a0>, method = 'GET', path = ''

    def _validate_response(
        self,
        response: Response,
        method: str,
        path: str,
    ) -> None:
        msg: str
        if response is None or response is NotImplemented:
            msg = (
                "Null or UnImplemented Response!"
                f" Request with method '{method}' to URL '{path}'"
                f" returned {response!r} instead of a response object."
                " Perhaps you forgot to return a response object in the correlating"
                " router."
            )
            raise RuntimeError(msg)
    
        if response is NO_RESPONSE:
            msg = (
                f"path '{path}' doesn't match with any of the other '{method}' "
                f"routes patterns: {list(self.routes[method].keys())}"
            )
>           raise ValueError(msg)
E           ValueError: path '' doesn't match with any of the other 'GET' routes patterns: ['/computeMetadata/v1/instance/service-accounts/default/', '/computeMetadata/v1/instance/service-accounts/default/email', '/computeMetadata/v1/instance/service-accounts/\\w+@[a-zA-Z]+\\.com/token']

.venv/lib/python3.11/site-packages/integration_testing/requests/session.py:150: ValueError

The above exception was the direct cause of the following exception:

self = <gmail.tests.test_google_gmail_connector.TestTestRun object at 0x7f9243d8b450>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243be8f90>
connector_output = <integration_testing.platform.script_output.MockConnectorOutput object at 0x7f9243f7c430>

    @set_metadata(
            connector_def_file_path=DEF_PATH,
            parameters=DEFAULT_PARAMETERS
    )
    def test_connector_test_run_no_mail(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            connector_output: MockConnectorOutput,
    ) -> None:
        set_is_test_run_to_true()
    
        loop = asyncio.get_event_loop()
>       loop.run_until_complete(main())

tests/test_google_gmail_connector.py:88: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/asyncio/base_events.py:654: in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
connectors/GmailConnector.py:532: in main
    await asyncio.ensure_future(connector.start())
.venv/lib/python3.11/site-packages/TIPCommon/base/utils.py:152: in wrapper
    return await func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <gmail.connectors.GmailConnector.GoogleGmailConnector object at 0x7f9243b8efd0>

    @async_output_handler
    async def start(self) -> None:
        """
        Executes the connector logic.
    
        Execution steps:
    
            1. Extracting connector script parameters from the SDK connector object
            2. Validate parameters values
            3. Loading the connector context data via the SDK connector object
            4. Initializing the integrations manager(s)
            5. Fetching & parsing alerts from the product via integration manager
            6. Filtering the alerts
            7. Processing the filtered alerts into siemplify alerts
            8. Saving connector context data via the SDK connector object
            9. Sending newly created siemplify alerts to the platform
    
        Raises:
            ConnectorSetupError: if any of the pre-processing phases fail
        """
        self.logger.info(
            f'---------------- Starting connector {self.script_name} '
            'execution ----------------'
        )
        if self.is_test_run:
            self.logger.info(
                '****** This is an \"IDE Play Button\"\\\"Run Connector once\" '
                'test run ******'
            )
    
        self.logger.info(
            '------------------- Main - Param Init -------------------'
        )
        self.extract_params()
        self.logger.info(
            '------------------- Main - Started -------------------'
        )
        processed_alerts = []
    
        try:
            try:
                self.validate_params_wrapper()
                self.read_context_wrapper()
                self.logger.info('Initializing managers...')
                self.init_managers()
            except Exception as e:
>               raise ConnectorSetupError(e) from e
E               TIPCommon.exceptions.ConnectorSetupError: path '' doesn't match with any of the other 'GET' routes patterns: ['/computeMetadata/v1/instance/service-accounts/default/', '/computeMetadata/v1/instance/service-accounts/default/email', '/computeMetadata/v1/instance/service-accounts/\\w+@[a-zA-Z]+\\.com/token']

.venv/lib/python3.11/site-packages/TIPCommon/base/connector/async_connector.py:539: ConnectorSetupError
tests/test_google_gmail_connector.py::TestTestRun::test_connector_test_run_with_mail
self = <gmail.connectors.GmailConnector.GoogleGmailConnector object at 0x7f9243e6c690>

    @async_output_handler
    async def start(self) -> None:
        """
        Executes the connector logic.
    
        Execution steps:
    
            1. Extracting connector script parameters from the SDK connector object
            2. Validate parameters values
            3. Loading the connector context data via the SDK connector object
            4. Initializing the integrations manager(s)
            5. Fetching & parsing alerts from the product via integration manager
            6. Filtering the alerts
            7. Processing the filtered alerts into siemplify alerts
            8. Saving connector context data via the SDK connector object
            9. Sending newly created siemplify alerts to the platform
    
        Raises:
            ConnectorSetupError: if any of the pre-processing phases fail
        """
        self.logger.info(
            f'---------------- Starting connector {self.script_name} '
            'execution ----------------'
        )
        if self.is_test_run:
            self.logger.info(
                '****** This is an \"IDE Play Button\"\\\"Run Connector once\" '
                'test run ******'
            )
    
        self.logger.info(
            '------------------- Main - Param Init -------------------'
        )
        self.extract_params()
        self.logger.info(
            '------------------- Main - Started -------------------'
        )
        processed_alerts = []
    
        try:
            try:
                self.validate_params_wrapper()
                self.read_context_wrapper()
                self.logger.info('Initializing managers...')
>               self.init_managers()

.venv/lib/python3.11/site-packages/TIPCommon/base/connector/async_connector.py:537: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
connectors/GmailConnector.py:93: in init_managers
    auth_manager = build_auth_manager(
core/GoogleGmailAuth.py:90: in build_auth_manager
    return GoogleGmailAuthManager(
core/GoogleGmailAuth.py:112: in __init__
    self.credentials = build_workspace_credentials(
core/GoogleGmailUtils.py:355: in build_workspace_credentials
    adc_creds = get_adc()[0]
                ^^^^^^^^^
.venv/lib/python3.11/site-packages/TIPCommon/rest/auth.py:158: in get_adc
    return google.auth.default(scopes, request, quota_project_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/_default.py:714: in default
    credentials, project_id = checker()
                              ^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/_default.py:710: in <lambda>
    lambda: _get_gce_credentials(request, quota_project_id=quota_project_id),
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/_default.py:406: in _get_gce_credentials
    if _metadata.is_on_gce(request=request):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/compute_engine/_metadata.py:138: in is_on_gce
    if ping(request):
       ^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/compute_engine/_metadata.py:221: in ping
    response = request(
.venv/lib/python3.11/site-packages/google/auth/transport/requests.py:188: in __call__
    response = self.session.request(
tests/conftest.py:214: in mock_session_request
    return session.request(method, url, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/integration_testing/requests/session.py:89: in request
    response: MockResponse = self._do_request(method, request)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/integration_testing/requests/session.py:125: in _do_request
    self._validate_response(response, method, path)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <gmail.tests.core.session.GoogleGmailSession object at 0x7f92437e9a90>
response = <object object at 0x7f9248d859a0>, method = 'GET', path = ''

    def _validate_response(
        self,
        response: Response,
        method: str,
        path: str,
    ) -> None:
        msg: str
        if response is None or response is NotImplemented:
            msg = (
                "Null or UnImplemented Response!"
                f" Request with method '{method}' to URL '{path}'"
                f" returned {response!r} instead of a response object."
                " Perhaps you forgot to return a response object in the correlating"
                " router."
            )
            raise RuntimeError(msg)
    
        if response is NO_RESPONSE:
            msg = (
                f"path '{path}' doesn't match with any of the other '{method}' "
                f"routes patterns: {list(self.routes[method].keys())}"
            )
>           raise ValueError(msg)
E           ValueError: path '' doesn't match with any of the other 'GET' routes patterns: ['/computeMetadata/v1/instance/service-accounts/default/', '/computeMetadata/v1/instance/service-accounts/default/email', '/computeMetadata/v1/instance/service-accounts/\\w+@[a-zA-Z]+\\.com/token']

.venv/lib/python3.11/site-packages/integration_testing/requests/session.py:150: ValueError

The above exception was the direct cause of the following exception:

self = <gmail.tests.test_google_gmail_connector.TestTestRun object at 0x7f9243d8aa10>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f92437ea590>
connector_output = <integration_testing.platform.script_output.MockConnectorOutput object at 0x7f924377ead0>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1782723839447'}}, attachments={}, threads={})

    @set_metadata(
            connector_def_file_path=DEF_PATH,
            parameters=DEFAULT_PARAMETERS,
    )
    def test_connector_test_run_with_mail(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            connector_output: MockConnectorOutput,
            google_gmail: GoogleGmail,
    ) -> None:
        google_gmail.set_messages(
            MOCK_DATA["mail_without_attachments"],
            set_ts_to_now=True
        )
        set_is_test_run_to_true()
    
        loop = asyncio.get_event_loop()
>       loop.run_until_complete(main())

tests/test_google_gmail_connector.py:112: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/asyncio/base_events.py:654: in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
connectors/GmailConnector.py:532: in main
    await asyncio.ensure_future(connector.start())
.venv/lib/python3.11/site-packages/TIPCommon/base/utils.py:152: in wrapper
    return await func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <gmail.connectors.GmailConnector.GoogleGmailConnector object at 0x7f9243e6c690>

    @async_output_handler
    async def start(self) -> None:
        """
        Executes the connector logic.
    
        Execution steps:
    
            1. Extracting connector script parameters from the SDK connector object
            2. Validate parameters values
            3. Loading the connector context data via the SDK connector object
            4. Initializing the integrations manager(s)
            5. Fetching & parsing alerts from the product via integration manager
            6. Filtering the alerts
            7. Processing the filtered alerts into siemplify alerts
            8. Saving connector context data via the SDK connector object
            9. Sending newly created siemplify alerts to the platform
    
        Raises:
            ConnectorSetupError: if any of the pre-processing phases fail
        """
        self.logger.info(
            f'---------------- Starting connector {self.script_name} '
            'execution ----------------'
        )
        if self.is_test_run:
            self.logger.info(
                '****** This is an \"IDE Play Button\"\\\"Run Connector once\" '
                'test run ******'
            )
    
        self.logger.info(
            '------------------- Main - Param Init -------------------'
        )
        self.extract_params()
        self.logger.info(
            '------------------- Main - Started -------------------'
        )
        processed_alerts = []
    
        try:
            try:
                self.validate_params_wrapper()
                self.read_context_wrapper()
                self.logger.info('Initializing managers...')
                self.init_managers()
            except Exception as e:
>               raise ConnectorSetupError(e) from e
E               TIPCommon.exceptions.ConnectorSetupError: path '' doesn't match with any of the other 'GET' routes patterns: ['/computeMetadata/v1/instance/service-accounts/default/', '/computeMetadata/v1/instance/service-accounts/default/email', '/computeMetadata/v1/instance/service-accounts/\\w+@[a-zA-Z]+\\.com/token']

.venv/lib/python3.11/site-packages/TIPCommon/base/connector/async_connector.py:539: ConnectorSetupError
tests/test_google_gmail_connector.py::TestTestRun::test_connector_test_run_with_mail_no_context
self = <gmail.connectors.GmailConnector.GoogleGmailConnector object at 0x7f92435f5450>

    @async_output_handler
    async def start(self) -> None:
        """
        Executes the connector logic.
    
        Execution steps:
    
            1. Extracting connector script parameters from the SDK connector object
            2. Validate parameters values
            3. Loading the connector context data via the SDK connector object
            4. Initializing the integrations manager(s)
            5. Fetching & parsing alerts from the product via integration manager
            6. Filtering the alerts
            7. Processing the filtered alerts into siemplify alerts
            8. Saving connector context data via the SDK connector object
            9. Sending newly created siemplify alerts to the platform
    
        Raises:
            ConnectorSetupError: if any of the pre-processing phases fail
        """
        self.logger.info(
            f'---------------- Starting connector {self.script_name} '
            'execution ----------------'
        )
        if self.is_test_run:
            self.logger.info(
                '****** This is an \"IDE Play Button\"\\\"Run Connector once\" '
                'test run ******'
            )
    
        self.logger.info(
            '------------------- Main - Param Init -------------------'
        )
        self.extract_params()
        self.logger.info(
            '------------------- Main - Started -------------------'
        )
        processed_alerts = []
    
        try:
            try:
                self.validate_params_wrapper()
                self.read_context_wrapper()
                self.logger.info('Initializing managers...')
>               self.init_managers()

.venv/lib/python3.11/site-packages/TIPCommon/base/connector/async_connector.py:537: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
connectors/GmailConnector.py:93: in init_managers
    auth_manager = build_auth_manager(
core/GoogleGmailAuth.py:90: in build_auth_manager
    return GoogleGmailAuthManager(
core/GoogleGmailAuth.py:112: in __init__
    self.credentials = build_workspace_credentials(
core/GoogleGmailUtils.py:355: in build_workspace_credentials
    adc_creds = get_adc()[0]
                ^^^^^^^^^
.venv/lib/python3.11/site-packages/TIPCommon/rest/auth.py:158: in get_adc
    return google.auth.default(scopes, request, quota_project_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/_default.py:714: in default
    credentials, project_id = checker()
                              ^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/_default.py:710: in <lambda>
    lambda: _get_gce_credentials(request, quota_project_id=quota_project_id),
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/_default.py:406: in _get_gce_credentials
    if _metadata.is_on_gce(request=request):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/compute_engine/_metadata.py:138: in is_on_gce
    if ping(request):
       ^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/compute_engine/_metadata.py:221: in ping
    response = request(
.venv/lib/python3.11/site-packages/google/auth/transport/requests.py:188: in __call__
    response = self.session.request(
tests/conftest.py:214: in mock_session_request
    return session.request(method, url, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/integration_testing/requests/session.py:89: in request
    response: MockResponse = self._do_request(method, request)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/integration_testing/requests/session.py:125: in _do_request
    self._validate_response(response, method, path)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <gmail.tests.core.session.GoogleGmailSession object at 0x7f924351cd90>
response = <object object at 0x7f9248d859a0>, method = 'GET', path = ''

    def _validate_response(
        self,
        response: Response,
        method: str,
        path: str,
    ) -> None:
        msg: str
        if response is None or response is NotImplemented:
            msg = (
                "Null or UnImplemented Response!"
                f" Request with method '{method}' to URL '{path}'"
                f" returned {response!r} instead of a response object."
                " Perhaps you forgot to return a response object in the correlating"
                " router."
            )
            raise RuntimeError(msg)
    
        if response is NO_RESPONSE:
            msg = (
                f"path '{path}' doesn't match with any of the other '{method}' "
                f"routes patterns: {list(self.routes[method].keys())}"
            )
>           raise ValueError(msg)
E           ValueError: path '' doesn't match with any of the other 'GET' routes patterns: ['/computeMetadata/v1/instance/service-accounts/default/', '/computeMetadata/v1/instance/service-accounts/default/email', '/computeMetadata/v1/instance/service-accounts/\\w+@[a-zA-Z]+\\.com/token']

.venv/lib/python3.11/site-packages/integration_testing/requests/session.py:150: ValueError

The above exception was the direct cause of the following exception:

self = <gmail.tests.test_google_gmail_connector.TestTestRun object at 0x7f9243d89790>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f924351ce50>
connector_output = <integration_testing.platform.script_output.MockConnectorOutput object at 0x7f9243628fa0>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1782723839738'}}, attachments={}, threads={})
external_context = MockExternalContext(_rows={})

    @set_metadata(
        connector_def_file_path=DEF_PATH,
        parameters=DEFAULT_PARAMETERS,
        external_context=MockExternalContext(),
    )
    def test_connector_test_run_with_mail_no_context(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            connector_output: MockConnectorOutput,
            google_gmail: GoogleGmail,
            external_context: MockExternalContext,
    ) -> None:
        google_gmail.set_messages(
            MOCK_DATA["mail_without_attachments"],
            set_ts_to_now=True
        )
        set_is_test_run_to_true()
    
        loop = asyncio.get_event_loop()
>       loop.run_until_complete(main())

tests/test_google_gmail_connector.py:138: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/asyncio/base_events.py:654: in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
connectors/GmailConnector.py:532: in main
    await asyncio.ensure_future(connector.start())
.venv/lib/python3.11/site-packages/TIPCommon/base/utils.py:152: in wrapper
    return await func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <gmail.connectors.GmailConnector.GoogleGmailConnector object at 0x7f92435f5450>

    @async_output_handler
    async def start(self) -> None:
        """
        Executes the connector logic.
    
        Execution steps:
    
            1. Extracting connector script parameters from the SDK connector object
            2. Validate parameters values
            3. Loading the connector context data via the SDK connector object
            4. Initializing the integrations manager(s)
            5. Fetching & parsing alerts from the product via integration manager
            6. Filtering the alerts
            7. Processing the filtered alerts into siemplify alerts
            8. Saving connector context data via the SDK connector object
            9. Sending newly created siemplify alerts to the platform
    
        Raises:
            ConnectorSetupError: if any of the pre-processing phases fail
        """
        self.logger.info(
            f'---------------- Starting connector {self.script_name} '
            'execution ----------------'
        )
        if self.is_test_run:
            self.logger.info(
                '****** This is an \"IDE Play Button\"\\\"Run Connector once\" '
                'test run ******'
            )
    
        self.logger.info(
            '------------------- Main - Param Init -------------------'
        )
        self.extract_params()
        self.logger.info(
            '------------------- Main - Started -------------------'
        )
        processed_alerts = []
    
        try:
            try:
                self.validate_params_wrapper()
                self.read_context_wrapper()
                self.logger.info('Initializing managers...')
                self.init_managers()
            except Exception as e:
>               raise ConnectorSetupError(e) from e
E               TIPCommon.exceptions.ConnectorSetupError: path '' doesn't match with any of the other 'GET' routes patterns: ['/computeMetadata/v1/instance/service-accounts/default/', '/computeMetadata/v1/instance/service-accounts/default/email', '/computeMetadata/v1/instance/service-accounts/\\w+@[a-zA-Z]+\\.com/token']

.venv/lib/python3.11/site-packages/TIPCommon/base/connector/async_connector.py:539: ConnectorSetupError
tests/test_google_gmail_connector.py::TestConnectorExternalContext::test_connector_test_run_with_mail_ids
self = <gmail.tests.test_google_gmail_connector.TestConnectorExternalContext object at 0x7f9243d8a810>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f92447eab90>
connector_output = <integration_testing.platform.script_output.MockConnectorOutput object at 0x7f924388c4c0>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1782723840290'}}, attachments={}, threads={})
external_context = MockExternalContext(_rows={})

    @set_metadata(
        connector_def_file_path=DEF_PATH,
        parameters=DEFAULT_PARAMETERS,
        external_context=MockExternalContext(),
    )
    def test_connector_test_run_with_mail_ids(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            connector_output: MockConnectorOutput,
            google_gmail: GoogleGmail,
            external_context: MockExternalContext,
    ) -> None:
        google_gmail.set_messages(
            MOCK_DATA["mail_without_attachments"],
            set_ts_to_now=True
        )
    
        loop = asyncio.get_event_loop()
        loop.run_until_complete(main())
    
>       assert_list_labels(gmail_script_session.request_history, index=1)

tests/test_google_gmail_connector.py:175: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/utils.py:149: in assert_list_labels
    history_records.assert_url_path_with_regex(
.venv/lib/python3.11/site-packages/integration_testing/aiohttp/session.py:74: in assert_url_path_with_regex
    if not all(re.search(regex_pattern, hr.request.url.path) for hr in self[start:stop]):
                                                                       ^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/integration_testing/aiohttp/session.py:61: in __getitem__
    result: slice | HistoryRecordsList = super().__getitem__(item)
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/collections/__init__.py:1241: in __getitem__
    return self.__class__(self.data[i])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <[AttributeError("'HistoryRecordsList' object has no attribute 'data'") raised in repr()] HistoryRecordsList object at 0x7f92436895d0>
history_records = ([],)

    def __init__(self, *history_records: HistoryRecord) -> None:
        if not all(isinstance(el, HistoryRecord) for el in history_records):
            msg: str = "List items must be of type HistoryRecord"
>           raise TypeError(msg)
E           TypeError: List items must be of type HistoryRecord

.venv/lib/python3.11/site-packages/integration_testing/aiohttp/session.py:50: TypeError
tests/test_google_gmail_connector.py::TestConnectorExternalContext::test_connector_test_run_with_mail_timestamp
self = <gmail.tests.test_google_gmail_connector.TestConnectorExternalContext object at 0x7f9243d88a10>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f92435b3310>
connector_output = <integration_testing.platform.script_output.MockConnectorOutput object at 0x7f9245126410>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1782723840459'}}, attachments={}, threads={})
external_context = MockExternalContext(_rows={})

    @set_metadata(
        connector_def_file_path=DEF_PATH,
        parameters=DEFAULT_PARAMETERS,
        external_context=MockExternalContext(),
    )
    def test_connector_test_run_with_mail_timestamp(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            connector_output: MockConnectorOutput,
            google_gmail: GoogleGmail,
            external_context: MockExternalContext,
    ) -> None:
        google_gmail.set_messages(
            MOCK_DATA["mail_without_attachments"],
            set_ts_to_now=True
        )
    
        loop = asyncio.get_event_loop()
        loop.run_until_complete(main())
    
>       assert_list_labels(gmail_script_session.request_history, index=1)

tests/test_google_gmail_connector.py:210: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/utils.py:149: in assert_list_labels
    history_records.assert_url_path_with_regex(
.venv/lib/python3.11/site-packages/integration_testing/aiohttp/session.py:74: in assert_url_path_with_regex
    if not all(re.search(regex_pattern, hr.request.url.path) for hr in self[start:stop]):
                                                                       ^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/integration_testing/aiohttp/session.py:61: in __getitem__
    result: slice | HistoryRecordsList = super().__getitem__(item)
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/collections/__init__.py:1241: in __getitem__
    return self.__class__(self.data[i])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <[AttributeError("'HistoryRecordsList' object has no attribute 'data'") raised in repr()] HistoryRecordsList object at 0x7f9243c40390>
history_records = ([],)

    def __init__(self, *history_records: HistoryRecord) -> None:
        if not all(isinstance(el, HistoryRecord) for el in history_records):
            msg: str = "List items must be of type HistoryRecord"
>           raise TypeError(msg)
E           TypeError: List items must be of type HistoryRecord

.venv/lib/python3.11/site-packages/integration_testing/aiohttp/session.py:50: TypeError
tests/test_google_gmail_connector.py::TestConnectorWithAttachments::test_connector_test_run_with_attach_eml
self = <gmail.tests.test_google_gmail_connector.TestConnectorWithAttachments object at 0x7f9243eeb410>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f92435f4090>
connector_output = <integration_testing.platform.script_output.MockConnectorOutput object at 0x7f92452ea710>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1782723840616'}}, attachments={}, threads={})
external_context = MockExternalContext(_rows={})

    @set_metadata(
        connector_def_file_path=DEF_PATH,
        parameters=PARAMETERS_ATTACH_EML,
        external_context=MockExternalContext(),
    )
    def test_connector_test_run_with_attach_eml(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            connector_output: MockConnectorOutput,
            google_gmail: GoogleGmail,
            external_context: MockExternalContext,
    ) -> None:
        google_gmail.set_messages(
            MOCK_DATA["mail_without_attachments"],
            set_ts_to_now=True
        )
    
        loop = asyncio.get_event_loop()
        loop.run_until_complete(main())
    
>       assert_list_labels(gmail_script_session.request_history, index=1)

tests/test_google_gmail_connector.py:251: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/utils.py:149: in assert_list_labels
    history_records.assert_url_path_with_regex(
.venv/lib/python3.11/site-packages/integration_testing/aiohttp/session.py:74: in assert_url_path_with_regex
    if not all(re.search(regex_pattern, hr.request.url.path) for hr in self[start:stop]):
                                                                       ^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/integration_testing/aiohttp/session.py:61: in __getitem__
    result: slice | HistoryRecordsList = super().__getitem__(item)
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/collections/__init__.py:1241: in __getitem__
    return self.__class__(self.data[i])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <[AttributeError("'HistoryRecordsList' object has no attribute 'data'") raised in repr()] HistoryRecordsList object at 0x7f92436ff810>
history_records = ([],)

    def __init__(self, *history_records: HistoryRecord) -> None:
        if not all(isinstance(el, HistoryRecord) for el in history_records):
            msg: str = "List items must be of type HistoryRecord"
>           raise TypeError(msg)
E           TypeError: List items must be of type HistoryRecord

.venv/lib/python3.11/site-packages/integration_testing/aiohttp/session.py:50: TypeError
tests/test_google_gmail_connector.py::TestConnectorWithAttachments::test_connector_test_run_with_eml_single_alert
self = <gmail.tests.test_google_gmail_connector.TestConnectorWithAttachments object at 0x7f9243ee9d10>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243bc5f90>
connector_output = <integration_testing.platform.script_output.MockConnectorOutput object at 0x7f9243abd5d0>
google_gmail = GoogleGmail(messages={'190e8e97b4564924': {'id': '190e8e97b4564924', 'threadId': '190e8e97b4564924', 'labelIds': ['UNR...FVTOkNPTkZJUk1FRA0KU1VNTUFSWTpUZXN0IEdtYWlsDQpUUkFOU1A6T1BBUVVFDQpFTkQ6VkVWRU5UDQpFTkQ6VkNBTEVOREFSDQo='}}, threads={})
external_context = MockExternalContext(_rows={})

    @set_metadata(
        connector_def_file_path=DEF_PATH,
        parameters=DEFAULT_PARAMETERS,
        external_context=MockExternalContext(),
    )
    def test_connector_test_run_with_eml_single_alert(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            connector_output: MockConnectorOutput,
            google_gmail: GoogleGmail,
            external_context: MockExternalContext,
    ) -> None:
        google_gmail.set_messages(
            MOCK_DATA["mail_with_eml"],
            set_ts_to_now=True
        )
        google_gmail.set_attachments(MOCK_DATA["attachments"])
    
        loop = asyncio.get_event_loop()
        loop.run_until_complete(main())
    
>       assert_list_labels(gmail_script_session.request_history, index=1)

tests/test_google_gmail_connector.py:291: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/utils.py:149: in assert_list_labels
    history_records.assert_url_path_with_regex(
.venv/lib/python3.11/site-packages/integration_testing/aiohttp/session.py:74: in assert_url_path_with_regex
    if not all(re.search(regex_pattern, hr.request.url.path) for hr in self[start:stop]):
                                                                       ^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/integration_testing/aiohttp/session.py:61: in __getitem__
    result: slice | HistoryRecordsList = super().__getitem__(item)
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/collections/__init__.py:1241: in __getitem__
    return self.__class__(self.data[i])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <[AttributeError("'HistoryRecordsList' object has no attribute 'data'") raised in repr()] HistoryRecordsList object at 0x7f92453cdc10>
history_records = ([],)

    def __init__(self, *history_records: HistoryRecord) -> None:
        if not all(isinstance(el, HistoryRecord) for el in history_records):
            msg: str = "List items must be of type HistoryRecord"
>           raise TypeError(msg)
E           TypeError: List items must be of type HistoryRecord

.venv/lib/python3.11/site-packages/integration_testing/aiohttp/session.py:50: TypeError
tests/test_google_gmail_connector.py::TestConnectorWithAttachments::test_connector_test_run_with_eml_multiple_alerts
self = <gmail.tests.test_google_gmail_connector.TestConnectorWithAttachments object at 0x7f9243ee9110>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243b47890>
connector_output = <integration_testing.platform.script_output.MockConnectorOutput object at 0x7f9243c456f0>
google_gmail = GoogleGmail(messages={'190e8e97b4564924': {'id': '190e8e97b4564924', 'threadId': '190e8e97b4564924', 'labelIds': ['UNR...FVTOkNPTkZJUk1FRA0KU1VNTUFSWTpUZXN0IEdtYWlsDQpUUkFOU1A6T1BBUVVFDQpFTkQ6VkVWRU5UDQpFTkQ6VkNBTEVOREFSDQo='}}, threads={})
external_context = MockExternalContext(_rows={})

    @set_metadata(
        connector_def_file_path=DEF_PATH,
        parameters=PARAMETERS_WITH_MULTIPLE_ALERTS_MODE,
        external_context=MockExternalContext(),
    )
    def test_connector_test_run_with_eml_multiple_alerts(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            connector_output: MockConnectorOutput,
            google_gmail: GoogleGmail,
            external_context: MockExternalContext,
    ) -> None:
        google_gmail.set_messages(
            MOCK_DATA["mail_with_eml"],
            set_ts_to_now=True
        )
        google_gmail.set_attachments(MOCK_DATA["attachments"])
    
        loop = asyncio.get_event_loop()
        loop.run_until_complete(main())
    
>       assert_list_labels(gmail_script_session.request_history, index=1)

tests/test_google_gmail_connector.py:332: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/utils.py:149: in assert_list_labels
    history_records.assert_url_path_with_regex(
.venv/lib/python3.11/site-packages/integration_testing/aiohttp/session.py:74: in assert_url_path_with_regex
    if not all(re.search(regex_pattern, hr.request.url.path) for hr in self[start:stop]):
                                                                       ^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/integration_testing/aiohttp/session.py:61: in __getitem__
    result: slice | HistoryRecordsList = super().__getitem__(item)
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/collections/__init__.py:1241: in __getitem__
    return self.__class__(self.data[i])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <[AttributeError("'HistoryRecordsList' object has no attribute 'data'") raised in repr()] HistoryRecordsList object at 0x7f9243a10f90>
history_records = ([],)

    def __init__(self, *history_records: HistoryRecord) -> None:
        if not all(isinstance(el, HistoryRecord) for el in history_records):
            msg: str = "List items must be of type HistoryRecord"
>           raise TypeError(msg)
E           TypeError: List items must be of type HistoryRecord

.venv/lib/python3.11/site-packages/integration_testing/aiohttp/session.py:50: TypeError
tests/test_google_gmail_connector.py::TestConnectorWithAttachments::test_connector_test_run_with_attachments
self = <gmail.tests.test_google_gmail_connector.TestConnectorWithAttachments object at 0x7f9243eebd10>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243d08f50>
connector_output = <integration_testing.platform.script_output.MockConnectorOutput object at 0x7f9243e27310>
google_gmail = GoogleGmail(messages={'190ee8f88c8a5f34': {'id': '190ee8f88c8a5f34', 'threadId': '190ee8f88c8a5f34', 'labelIds': ['CAT...FVTOkNPTkZJUk1FRA0KU1VNTUFSWTpUZXN0IEdtYWlsDQpUUkFOU1A6T1BBUVVFDQpFTkQ6VkVWRU5UDQpFTkQ6VkNBTEVOREFSDQo='}}, threads={})
external_context = MockExternalContext(_rows={})

    @set_metadata(
        connector_def_file_path=DEF_PATH,
        parameters=PARAMETERS_WITH_MULTIPLE_ALERTS_MODE,
        external_context=MockExternalContext(),
    )
    def test_connector_test_run_with_attachments(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            connector_output: MockConnectorOutput,
            google_gmail: GoogleGmail,
            external_context: MockExternalContext,
    ) -> None:
        google_gmail.set_messages(
            MOCK_DATA["mail_with_files"],
            set_ts_to_now=True
        )
        google_gmail.set_attachments(MOCK_DATA["attachments"])
    
        loop = asyncio.get_event_loop()
        loop.run_until_complete(main())
    
>       assert_list_labels(gmail_script_session.request_history, index=1)

tests/test_google_gmail_connector.py:374: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/utils.py:149: in assert_list_labels
    history_records.assert_url_path_with_regex(
.venv/lib/python3.11/site-packages/integration_testing/aiohttp/session.py:74: in assert_url_path_with_regex
    if not all(re.search(regex_pattern, hr.request.url.path) for hr in self[start:stop]):
                                                                       ^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/integration_testing/aiohttp/session.py:61: in __getitem__
    result: slice | HistoryRecordsList = super().__getitem__(item)
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/collections/__init__.py:1241: in __getitem__
    return self.__class__(self.data[i])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <[AttributeError("'HistoryRecordsList' object has no attribute 'data'") raised in repr()] HistoryRecordsList object at 0x7f9243cd7910>
history_records = ([],)

    def __init__(self, *history_records: HistoryRecord) -> None:
        if not all(isinstance(el, HistoryRecord) for el in history_records):
            msg: str = "List items must be of type HistoryRecord"
>           raise TypeError(msg)
E           TypeError: List items must be of type HistoryRecord

.venv/lib/python3.11/site-packages/integration_testing/aiohttp/session.py:50: TypeError
tests/test_google_gmail_connector.py::TestConnectorApiError::test_connector_api_error
self = <gmail.tests.test_google_gmail_connector.TestConnectorApiError object at 0x7f9243ee8890>
google_gmail = GoogleGmail(messages={}, attachments={}, threads={})
mocker = <pytest_mock.plugin.MockerFixture object at 0x7f92435afc10>

    @set_metadata(
        connector_def_file_path=DEF_PATH,
        parameters=DEFAULT_PARAMETERS,
    )
    def test_connector_api_error(
            self,
            google_gmail: GoogleGmail,
            mocker,
    ) -> None:
        """Connector propagates an API error raised during get_alerts.
    
        When the Gmail labels API call fails (e.g. due to an auth or network
        issue), the exception must propagate to the caller in test-run mode.
        """
        set_is_test_run_to_true()
    
        # ISSUE FINDER: list_labels is called inside get_alerts (not init_managers),
        # so the exception is caught by the outer handler and re-raised only in
        # test-run mode. In a production run the error would be silently logged.
        mocker.patch.object(
            google_gmail,
            "list_labels",
            side_effect=Exception("Simulated API error"),
        )
    
        loop = asyncio.get_event_loop()
>       with pytest.raises(Exception, match="Simulated API error"):
E       AssertionError: Regex pattern did not match.
E         Expected regex: 'Simulated API error'
E         Actual message: "path '' doesn't match with any of the other 'GET' routes patterns: ['/computeMetadata/v1/instance/service-accounts/default/', '/computeMetadata/v1/instance/service-accounts/default/email', '/computeMetadata/v1/instance/service-accounts/\\\\w+@[a-zA-Z]+\\\\.com/token']"

tests/test_google_gmail_connector.py:425: AssertionError
tests/test_google_gmail_connector.py::TestEmailStatusFilter::test_connector_unread_filter
self = <gmail.connectors.GmailConnector.GoogleGmailConnector object at 0x7f9243be1d10>

    @async_output_handler
    async def start(self) -> None:
        """
        Executes the connector logic.
    
        Execution steps:
    
            1. Extracting connector script parameters from the SDK connector object
            2. Validate parameters values
            3. Loading the connector context data via the SDK connector object
            4. Initializing the integrations manager(s)
            5. Fetching & parsing alerts from the product via integration manager
            6. Filtering the alerts
            7. Processing the filtered alerts into siemplify alerts
            8. Saving connector context data via the SDK connector object
            9. Sending newly created siemplify alerts to the platform
    
        Raises:
            ConnectorSetupError: if any of the pre-processing phases fail
        """
        self.logger.info(
            f'---------------- Starting connector {self.script_name} '
            'execution ----------------'
        )
        if self.is_test_run:
            self.logger.info(
                '****** This is an \"IDE Play Button\"\\\"Run Connector once\" '
                'test run ******'
            )
    
        self.logger.info(
            '------------------- Main - Param Init -------------------'
        )
        self.extract_params()
        self.logger.info(
            '------------------- Main - Started -------------------'
        )
        processed_alerts = []
    
        try:
            try:
                self.validate_params_wrapper()
                self.read_context_wrapper()
                self.logger.info('Initializing managers...')
>               self.init_managers()

.venv/lib/python3.11/site-packages/TIPCommon/base/connector/async_connector.py:537: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
connectors/GmailConnector.py:93: in init_managers
    auth_manager = build_auth_manager(
core/GoogleGmailAuth.py:90: in build_auth_manager
    return GoogleGmailAuthManager(
core/GoogleGmailAuth.py:112: in __init__
    self.credentials = build_workspace_credentials(
core/GoogleGmailUtils.py:355: in build_workspace_credentials
    adc_creds = get_adc()[0]
                ^^^^^^^^^
.venv/lib/python3.11/site-packages/TIPCommon/rest/auth.py:158: in get_adc
    return google.auth.default(scopes, request, quota_project_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/_default.py:714: in default
    credentials, project_id = checker()
                              ^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/_default.py:710: in <lambda>
    lambda: _get_gce_credentials(request, quota_project_id=quota_project_id),
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/_default.py:406: in _get_gce_credentials
    if _metadata.is_on_gce(request=request):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/compute_engine/_metadata.py:138: in is_on_gce
    if ping(request):
       ^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/compute_engine/_metadata.py:221: in ping
    response = request(
.venv/lib/python3.11/site-packages/google/auth/transport/requests.py:188: in __call__
    response = self.session.request(
tests/conftest.py:214: in mock_session_request
    return session.request(method, url, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/integration_testing/requests/session.py:89: in request
    response: MockResponse = self._do_request(method, request)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/integration_testing/requests/session.py:125: in _do_request
    self._validate_response(response, method, path)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <gmail.tests.core.session.GoogleGmailSession object at 0x7f92435affd0>
response = <object object at 0x7f9248d859a0>, method = 'GET', path = ''

    def _validate_response(
        self,
        response: Response,
        method: str,
        path: str,
    ) -> None:
        msg: str
        if response is None or response is NotImplemented:
            msg = (
                "Null or UnImplemented Response!"
                f" Request with method '{method}' to URL '{path}'"
                f" returned {response!r} instead of a response object."
                " Perhaps you forgot to return a response object in the correlating"
                " router."
            )
            raise RuntimeError(msg)
    
        if response is NO_RESPONSE:
            msg = (
                f"path '{path}' doesn't match with any of the other '{method}' "
                f"routes patterns: {list(self.routes[method].keys())}"
            )
>           raise ValueError(msg)
E           ValueError: path '' doesn't match with any of the other 'GET' routes patterns: ['/computeMetadata/v1/instance/service-accounts/default/', '/computeMetadata/v1/instance/service-accounts/default/email', '/computeMetadata/v1/instance/service-accounts/\\w+@[a-zA-Z]+\\.com/token']

.venv/lib/python3.11/site-packages/integration_testing/requests/session.py:150: ValueError

The above exception was the direct cause of the following exception:

self = <gmail.tests.test_google_gmail_connector.TestEmailStatusFilter object at 0x7f9243ee8e90>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243cc75d0>
connector_output = <integration_testing.platform.script_output.MockConnectorOutput object at 0x7f924361bcd0>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...gwLS0NCg==', 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1782723841584'}}, attachments={}, threads={})

    @set_metadata(
        connector_def_file_path=DEF_PATH,
        parameters=UNREAD_ONLY_PARAMETERS,
    )
    def test_connector_unread_filter(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            connector_output: MockConnectorOutput,
            google_gmail: GoogleGmail,
    ) -> None:
        """Connector with Email Status=Unread runs successfully.
    
        Verifies the connector processes emails correctly when the
        Unread-only filter is enabled.
        """
        google_gmail.set_messages(
            MOCK_DATA["mail_without_attachments"],
            set_ts_to_now=True,
        )
        set_is_test_run_to_true()
    
        loop = asyncio.get_event_loop()
>       loop.run_until_complete(main())

tests/test_google_gmail_connector.py:458: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/asyncio/base_events.py:654: in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
connectors/GmailConnector.py:532: in main
    await asyncio.ensure_future(connector.start())
.venv/lib/python3.11/site-packages/TIPCommon/base/utils.py:152: in wrapper
    return await func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <gmail.connectors.GmailConnector.GoogleGmailConnector object at 0x7f9243be1d10>

    @async_output_handler
    async def start(self) -> None:
        """
        Executes the connector logic.
    
        Execution steps:
    
            1. Extracting connector script parameters from the SDK connector object
            2. Validate parameters values
            3. Loading the connector context data via the SDK connector object
            4. Initializing the integrations manager(s)
            5. Fetching & parsing alerts from the product via integration manager
            6. Filtering the alerts
            7. Processing the filtered alerts into siemplify alerts
            8. Saving connector context data via the SDK connector object
            9. Sending newly created siemplify alerts to the platform
    
        Raises:
            ConnectorSetupError: if any of the pre-processing phases fail
        """
        self.logger.info(
            f'---------------- Starting connector {self.script_name} '
            'execution ----------------'
        )
        if self.is_test_run:
            self.logger.info(
                '****** This is an \"IDE Play Button\"\\\"Run Connector once\" '
                'test run ******'
            )
    
        self.logger.info(
            '------------------- Main - Param Init -------------------'
        )
        self.extract_params()
        self.logger.info(
            '------------------- Main - Started -------------------'
        )
        processed_alerts = []
    
        try:
            try:
                self.validate_params_wrapper()
                self.read_context_wrapper()
                self.logger.info('Initializing managers...')
                self.init_managers()
            except Exception as e:
>               raise ConnectorSetupError(e) from e
E               TIPCommon.exceptions.ConnectorSetupError: path '' doesn't match with any of the other 'GET' routes patterns: ['/computeMetadata/v1/instance/service-accounts/default/', '/computeMetadata/v1/instance/service-accounts/default/email', '/computeMetadata/v1/instance/service-accounts/\\w+@[a-zA-Z]+\\.com/token']

.venv/lib/python3.11/site-packages/TIPCommon/base/connector/async_connector.py:539: ConnectorSetupError
tests/test_ping.py::TestPing::test_success
self = <gmail.tests.test_ping.TestPing object at 0x7f92446c0610>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243904890>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243ae2cb0>, _err=<_io.StringIO object at 0x7f9243ae2e60>)

    @set_metadata(
        integration_config=CONFIG
    )
    def test_success(
            self,
            gmail_script_session: GoogleGmailSession,
            action_output: MockActionOutput,
    ) -> None:
        action = Ping(script_name=Constants.PING_SCRIPT_NAME)
        action._is_first_run = True
        action.run()
    
>       assert len(gmail_script_session.request_history) == 1
E       assert 0 == 1
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243904890>.request_history

tests/test_ping.py:64: AssertionError
tests/test_ping.py::TestPing::test_invalid_email
self = <gmail.tests.test_ping.TestPing object at 0x7f9244642fd0>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f92445d0710>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243ae2d40>, _err=<_io.StringIO object at 0x7f924375a290>)

    @set_metadata(
        integration_config=CONFIG_WITH_INVALID_EMAIL
    )
    def test_invalid_email(
            self,
            gmail_script_session: GoogleGmailSession,
            action_output: MockActionOutput,
    ) -> None:
        action = Ping(script_name=Constants.PING_SCRIPT_NAME)
        action._is_first_run = True
        action.run()
    
        assert len(gmail_script_session.request_history) == 0
>       assert INVALID_EMAIL_OUTPUT_MESSAGE in action_output.results.output_message
E       assert 'Failed to connect to the Gmail service!\nReason: Impersonation is not allowed for the provided service account. Please check the "Service Account Token Creator" role to the service account: ' in "Failed to connect to the Gmail service!\nReason: path '' doesn't match with any of the other 'GET' routes patterns: [...tance/service-accounts/default/email', '/computeMetadata/v1/instance/service-accounts/\\\\w+@[a-zA-Z]+\\\\.com/token']"
E        +  where "Failed to connect to the Gmail service!\nReason: path '' doesn't match with any of the other 'GET' routes patterns: [...tance/service-accounts/default/email', '/computeMetadata/v1/instance/service-accounts/\\\\w+@[a-zA-Z]+\\\\.com/token']" = ActionOutput(output_message="Failed to connect to the Gmail service!\nReason: path '' doesn't match with any of the ot...]+\\\\.com/token']", result_value=False, execution_state=<ExecutionState.FAILED: 2>, json_output=None, debug_output='').output_message
E        +    where ActionOutput(output_message="Failed to connect to the Gmail service!\nReason: path '' doesn't match with any of the ot...]+\\\\.com/token']", result_value=False, execution_state=<ExecutionState.FAILED: 2>, json_output=None, debug_output='') = MockActionOutput(_out=<_io.StringIO object at 0x7f9243ae2d40>, _err=<_io.StringIO object at 0x7f924375a290>).results

tests/test_ping.py:109: AssertionError
tests/wait_for_thread_reply/test_wait_for_thread_reply.py::TestAuth::test_mailbox_not_found
self = <gmail.tests.wait_for_thread_reply.test_wait_for_thread_reply.TestAuth object at 0x7f9243c24cd0>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243533090>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243af4b80>, _err=<_io.StringIO object at 0x7f9243af6050>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_INVALID_MAILBOX
    )
    def test_mailbox_not_found(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput,
    ) -> None:
        action = init_async_action(
            WaitForThreadReply,
            script_name=Constants.WAIT_FOR_THREAD_REPLY_SCRIPT_NAME,
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 1
E       assert 0 == 1
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243533090>.request_history

tests/wait_for_thread_reply/test_wait_for_thread_reply.py:116: AssertionError
tests/wait_for_thread_reply/test_wait_for_thread_reply.py::TestMessageID::test_email_not_found
self = <gmail.tests.wait_for_thread_reply.test_wait_for_thread_reply.TestMessageID object at 0x7f9243c253d0>
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243cf8790>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243af5000>, _err=<_io.StringIO object at 0x7f9243af6680>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG
    )
    def test_email_not_found(
            self,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput,
    ) -> None:
        action = init_async_action(
            WaitForThreadReply,
            script_name=Constants.WAIT_FOR_THREAD_REPLY_SCRIPT_NAME,
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 1
E       assert 0 == 1
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243cf8790>.request_history

tests/wait_for_thread_reply/test_wait_for_thread_reply.py:139: AssertionError
tests/wait_for_thread_reply/test_wait_for_thread_reply.py::TestReplies::test_no_replies
self = <gmail.tests.wait_for_thread_reply.test_wait_for_thread_reply.TestReplies object at 0x7f9243c26250>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...ary="000000000000b6f3cf061bb97b6f"'}]}, 'sizeEstimate': 6210, 'historyId': '5297', 'internalDate': '1719332308000'}]}})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243cb69d0>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243af5f30>, _err=<_io.StringIO object at 0x7f9243af5ab0>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MESSAGE_ID
    )
    def test_no_replies(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
        google_gmail.add_thread(MOCK_DATA["mail_without_attachments"][:1])
    
        action = init_async_action(
            WaitForThreadReply,
            script_name=Constants.WAIT_FOR_THREAD_REPLY_SCRIPT_NAME,
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 3
E       assert 0 == 3
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243cb69d0>.request_history

tests/wait_for_thread_reply/test_wait_for_thread_reply.py:170: AssertionError
tests/wait_for_thread_reply/test_wait_for_thread_reply.py::TestReplies::test_email_found_single_reply
self = <gmail.tests.wait_for_thread_reply.test_wait_for_thread_reply.TestReplies object at 0x7f9243c27290>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...ry="000000000000b8f8d5061bb97b9a"'}]}, 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}]}})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243cb4c90>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243af48b0>, _err=<_io.StringIO object at 0x7f9243af5510>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MESSAGE_ID
    )
    def test_email_found_single_reply(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
        google_gmail.add_thread(MOCK_DATA["mail_without_attachments"])
    
        action = init_async_action(
            WaitForThreadReply,
            script_name=Constants.WAIT_FOR_THREAD_REPLY_SCRIPT_NAME,
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 4
E       assert 0 == 4
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243cb4c90>.request_history

tests/wait_for_thread_reply/test_wait_for_thread_reply.py:202: AssertionError
tests/wait_for_thread_reply/test_wait_for_thread_reply.py::TestReplies::test_email_found_single_reply_no_wait
self = <gmail.tests.wait_for_thread_reply.test_wait_for_thread_reply.TestReplies object at 0x7f9243c26c50>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...ry="000000000000b8f8d5061bb97b9a"'}]}, 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}]}})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243b70bd0>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243af5e10>, _err=<_io.StringIO object at 0x7f9243af5120>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_NO_WAIT
    )
    def test_email_found_single_reply_no_wait(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
        google_gmail.add_thread(MOCK_DATA["mail_without_attachments"])
    
        action = init_async_action(
            WaitForThreadReply,
            script_name=Constants.WAIT_FOR_THREAD_REPLY_SCRIPT_NAME,
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 4
E       assert 0 == 4
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243b70bd0>.request_history

tests/wait_for_thread_reply/test_wait_for_thread_reply.py:235: AssertionError
tests/wait_for_thread_reply/test_wait_for_thread_reply.py::TestReplies::test_email_found_all_replies
self = <gmail.tests.wait_for_thread_reply.test_wait_for_thread_reply.TestReplies object at 0x7f9243c27990>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...faXAiOiAiMjA5Ljg1LjE2Ny43NCIgfQ=='}]}, 'sizeEstimate': 46276, 'historyId': '5439', 'internalDate': '1721989290000'}]}})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243bd2550>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243af55a0>, _err=<_io.StringIO object at 0x7f9243af49d0>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MESSAGE_ID
    )
    def test_email_found_all_replies(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(
            MOCK_DATA["mail_without_attachments"] +
            MOCK_DATA["mail_with_eml"] +
            MOCK_DATA["mail_with_files"]
        )
        google_gmail.add_thread(
            MOCK_DATA["mail_without_attachments"] +
            MOCK_DATA["mail_with_eml"] +
            MOCK_DATA["mail_with_files"]
        )
    
        action = init_async_action(
            WaitForThreadReply,
            script_name=Constants.WAIT_FOR_THREAD_REPLY_SCRIPT_NAME,
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 6
E       assert 0 == 6
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243bd2550>.request_history

tests/wait_for_thread_reply/test_wait_for_thread_reply.py:275: AssertionError
tests/wait_for_thread_reply/test_wait_for_thread_reply.py::TestAsyncTimeout::test_no_replies
self = <gmail.tests.wait_for_thread_reply.test_wait_for_thread_reply.TestAsyncTimeout object at 0x7f9243c321d0>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...ary="000000000000b6f3cf061bb97b6f"'}]}, 'sizeEstimate': 6210, 'historyId': '5297', 'internalDate': '1719332308000'}]}})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243e11c10>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243af6050>, _err=<_io.StringIO object at 0x7f9243af6560>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MESSAGE_ID
    )
    def test_no_replies(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
        google_gmail.add_thread(MOCK_DATA["mail_without_attachments"][:1])
    
        action = init_async_action(
            WaitForThreadReply,
            script_name=Constants.WAIT_FOR_THREAD_REPLY_SCRIPT_NAME,
            async_timeout_ms=0,
        )
        action.run()
    
>       assert len(gmail_script_session.request_history) == 3
E       assert 0 == 3
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243e11c10>.request_history

tests/wait_for_thread_reply/test_wait_for_thread_reply.py:311: AssertionError
tests/wait_for_thread_reply/test_wait_for_thread_reply.py::TestAsyncTimeout::test_email_found_single_reply
self = <gmail.tests.wait_for_thread_reply.test_wait_for_thread_reply.TestAsyncTimeout object at 0x7f9243c25b90>
google_gmail = GoogleGmail(messages={'19050407063955c1': {'id': '19050407063955c1', 'threadId': '19050407063955c1', 'snippet': 'Get t...ry="000000000000b8f8d5061bb97b9a"'}]}, 'sizeEstimate': 14616, 'historyId': '5298', 'internalDate': '1719333318000'}]}})
gmail_script_session = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243bb8b10>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f9243af5900>, _err=<_io.StringIO object at 0x7f9243af4e50>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_MESSAGE_ID
    )
    def test_email_found_single_reply(
            self,
            google_gmail: GoogleGmail,
            gmail_script_session: GoogleGmailAsyncSession,
            action_output: MockActionOutput
    ) -> None:
        google_gmail.set_messages(MOCK_DATA["mail_without_attachments"])
        google_gmail.add_thread(MOCK_DATA["mail_without_attachments"])
    
        action = init_async_action(
            WaitForThreadReply,
            script_name=Constants.WAIT_FOR_THREAD_REPLY_SCRIPT_NAME,
        )
        action.is_approaching_async_timeout = lambda: True
        action.run()
    
>       assert len(gmail_script_session.request_history) == 4
E       assert 0 == 4
E        +  where 0 = len([])
E        +    where [] = <gmail.tests.core.async_session.GoogleGmailAsyncSession object at 0x7f9243bb8b10>.request_history

tests/wait_for_thread_reply/test_wait_for_thread_reply.py:340: AssertionError

🧩 vertex_ai

✅ Passed ❌ Failed ⏭️ Skipped
6 15 0

❌ Failed Tests

tests/test_actions/test_publisher_name.py::test_configure_initial_publisher_name
vertexai_script_session = <vertex_ai.tests.core.session.ApiSession object at 0x7f88231f7c90>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f8823237eb0>, _err=<_io.StringIO object at 0x7f8824fbfeb0>)

    @set_metadata(
        integration_config=NEW_CONFIG,
        parameters={
            "Model ID": "gemini-1.5-flash-002",
            "Text Prompt": "Sample text.",
            "Temperature": None,
            "Candidate Count": None,
            "Response MIME type": "text/plain",
            "Response Schema": None,
            "Max Input Tokens": None,
            "Max Output Tokens": None,
        },
    )
    def test_configure_initial_publisher_name(
        vertexai_script_session: ApiSession,
        action_output: MockActionOutput,
    ) -> None:
        action = ExecutePrompt(script_name=Constants.EXECUTE_PROMPT_SCRIPT_NAME)
        action.run()
    
>       assert len(vertexai_script_session.request_history) >= 2
E       assert 0 >= 2
E        +  where 0 = len([])
E        +    where [] = <vertex_ai.tests.core.session.ApiSession object at 0x7f88231f7c90>.request_history

tests/test_actions/test_publisher_name.py:55: AssertionError
tests/test_actions/test_publisher_name.py::test_with_provided_publisher_name_in_action
vertexai_script_session = <vertex_ai.tests.core.session.ApiSession object at 0x7f88231f6cd0>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f8824b212d0>, _err=<_io.StringIO object at 0x7f8824b21480>)

    @set_metadata(
        integration_config=NEW_CONFIG2,
        parameters={
            "Model ID": "gemini-1.5-flash-002",
            "Text Prompt": "Sample text.",
            "Temperature": None,
            "Candidate Count": None,
            "Response MIME type": "text/plain",
            "Response Schema": None,
            "Max Input Tokens": None,
            "Max Output Tokens": None,
            "Publisher Name": NEW_PUBLISHER_NAME,
        },
    )
    def test_with_provided_publisher_name_in_action(
        vertexai_script_session: ApiSession,
        action_output: MockActionOutput,
    ) -> None:
        action = ExecutePrompt(script_name=Constants.EXECUTE_PROMPT_SCRIPT_NAME)
        action.run()
    
>       assert len(vertexai_script_session.request_history) >= 2
E       assert 0 >= 2
E        +  where 0 = len([])
E        +    where [] = <vertex_ai.tests.core.session.ApiSession object at 0x7f88231f6cd0>.request_history

tests/test_actions/test_publisher_name.py:101: AssertionError
tests/test_analyze_eml/test_analyze_eml.py::TestAuth::test_invalid_email
self = <vertex_ai.tests.test_analyze_eml.test_analyze_eml.TestAuth object at 0x7f88231d8f50>
vertexai_script_session = <vertex_ai.tests.core.session.ApiSession object at 0x7f88231e8790>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f8824b22c20>, _err=<_io.StringIO object at 0x7f8824fbfbe0>)

    @set_metadata(
        integration_config=CONFIG_WITH_INVALID_EMAIL
    )
    def test_invalid_email(
            self,
            vertexai_script_session: ApiSession,
            action_output: MockActionOutput,
    ) -> None:
        AnalyzeEML(script_name=Constants.ANALYZE_EML_SCRIPT_NAME).run()
    
>       assert len(vertexai_script_session.request_history) >= 1
E       assert 0 >= 1
E        +  where 0 = len([])
E        +    where [] = <vertex_ai.tests.core.session.ApiSession object at 0x7f88231e8790>.request_history

tests/test_analyze_eml/test_analyze_eml.py:103: AssertionError
tests/test_analyze_eml/test_analyze_eml.py::TestValid::test_invalid_files
self = <vertex_ai.tests.test_analyze_eml.test_analyze_eml.TestValid object at 0x7f88231d9e90>
vertexai_script_session = <vertex_ai.tests.core.session.ApiSession object at 0x7f88233bf810>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f8824aecb80>, _err=<_io.StringIO object at 0x7f8824aed3f0>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG,
    )
    def test_invalid_files(
            self,
            vertexai_script_session: ApiSession,
            action_output: MockActionOutput,
    ) -> None:
        AnalyzeEML(script_name=Constants.ANALYZE_EML_SCRIPT_NAME).run()
    
>       assert len(vertexai_script_session.request_history) >= 1
E       assert 0 >= 1
E        +  where 0 = len([])
E        +    where [] = <vertex_ai.tests.core.session.ApiSession object at 0x7f88233bf810>.request_history

tests/test_analyze_eml/test_analyze_eml.py:128: AssertionError
tests/test_analyze_eml/test_analyze_eml.py::TestValid::test_valid_invalid_files
self = <vertex_ai.tests.test_analyze_eml.test_analyze_eml.TestValid object at 0x7f88231d9c50>
vertexai_script_session = <vertex_ai.tests.core.session.ApiSession object at 0x7f882374ea90>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f8824aed510>, _err=<_io.StringIO object at 0x7f8824aedbd0>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_FILES,
    )
    def test_valid_invalid_files(
            self,
            vertexai_script_session: ApiSession,
            action_output: MockActionOutput,
    ) -> None:
        action = AnalyzeEML(script_name=Constants.ANALYZE_EML_SCRIPT_NAME)
        action.run()
        delete_test_attachments(ACTION_CONFIG_WITH_FILES["Files To Analyze"])
    
>       assert len(vertexai_script_session.request_history) >= 2
E       assert 0 >= 2
E        +  where 0 = len([])
E        +    where [] = <vertex_ai.tests.core.session.ApiSession object at 0x7f882374ea90>.request_history

tests/test_analyze_eml/test_analyze_eml.py:147: AssertionError
tests/test_describe_entity/test_describe_entity.py::TestAuth::test_invalid_email
self = <vertex_ai.tests.test_describe_entity.test_describe_entity.TestAuth object at 0x7f88231d05d0>
vertexai_script_session = <vertex_ai.tests.core.session.ApiSession object at 0x7f882374bb90>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f8824aee8c0>, _err=<_io.StringIO object at 0x7f8824aee3b0>)

    @set_metadata(integration_config=CONFIG_WITH_INVALID_EMAIL)
    def test_invalid_email(
            self,
            vertexai_script_session: ApiSession,
            action_output: MockActionOutput,
    ) -> None:
        DescribeEntity(script_name=Constants.DESCRIBE_ENTITY_SCRIPT_NAME).run()
    
>       assert len(vertexai_script_session.request_history) >= 1
E       assert 0 >= 1
E        +  where 0 = len([])
E        +    where [] = <vertex_ai.tests.core.session.ApiSession object at 0x7f882374bb90>.request_history

tests/test_describe_entity/test_describe_entity.py:90: AssertionError
tests/test_describe_entity/test_describe_entity.py::TestValid::test_valid_run
self = <vertex_ai.tests.test_describe_entity.test_describe_entity.TestValid object at 0x7f88231d0e50>
vertexai_script_session = <vertex_ai.tests.core.session.ApiSession object at 0x7f8823316b50>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f8824aee9e0>, _err=<_io.StringIO object at 0x7f8824aefac0>)
external_context = MockExternalContext(_rows={})

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG,
        entities=[
            DomainEntityInfo(
                identifier="user@email.com",
                additional_properties={"Environment": "Default Environment"},
                alert_identifier="test-alert",
                case_identifier=1,
                creation_time=unix_now(),
                modification_time=unix_now(),
                entity_type="UserUniqname",
                is_pivot=False,
                is_artifact=False,
                is_enriched=True,
                is_internal=True,
                is_suspicious=True,
                is_vulnerable=False,
            )
        ],
        external_context=MockExternalContext(),
    )
    def test_valid_run(
            self,
            vertexai_script_session: ApiSession,
            action_output: MockActionOutput,
            external_context: MockExternalContext,
    ) -> None:
        action = DescribeEntity(script_name=Constants.DESCRIBE_ENTITY_SCRIPT_NAME)
        action.soar_action.execution_deadline_unix_time_ms = unix_now() + 60_000
        action.soar_action.session = vertexai_script_session
        action.run()
    
>       assert len(vertexai_script_session.request_history) >= 2
E       assert 0 >= 2
E        +  where 0 = len([])
E        +    where [] = <vertex_ai.tests.core.session.ApiSession object at 0x7f8823316b50>.request_history

tests/test_describe_entity/test_describe_entity.py:137: AssertionError
tests/test_execute_prompt/test_execute_prompt.py::TestAuth::test_invalid_email
self = <vertex_ai.tests.test_execute_prompt.test_execute_prompt.TestAuth object at 0x7f882302b090>
vertexai_script_session = <vertex_ai.tests.core.session.ApiSession object at 0x7f882319d7d0>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f8824a20430>, _err=<_io.StringIO object at 0x7f8824a204c0>)

    @set_metadata(integration_config=CONFIG_WITH_INVALID_EMAIL)
    def test_invalid_email(
        self,
        vertexai_script_session: ApiSession,
        action_output: MockActionOutput,
    ) -> None:
        ExecutePrompt(script_name=Constants.EXECUTE_PROMPT_SCRIPT_NAME).run()
    
>       assert len(vertexai_script_session.request_history) >= 1
E       assert 0 >= 1
E        +  where 0 = len([])
E        +    where [] = <vertex_ai.tests.core.session.ApiSession object at 0x7f882319d7d0>.request_history

tests/test_execute_prompt/test_execute_prompt.py:86: AssertionError
tests/test_execute_prompt/test_execute_prompt.py::TestValid::test_token_count
self = <vertex_ai.tests.test_execute_prompt.test_execute_prompt.TestValid object at 0x7f8823028dd0>
vertexai_script_session = <vertex_ai.tests.core.session.ApiSession object at 0x7f882319d350>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f8824aee710>, _err=<_io.StringIO object at 0x7f8824aee8c0>)

    @set_metadata(integration_config=CONFIG, parameters=ACTION_CONFIG_WITH_TOKEN_COUNT)
    def test_token_count(
        self,
        vertexai_script_session: ApiSession,
        action_output: MockActionOutput,
    ) -> None:
        ExecutePrompt(script_name=Constants.EXECUTE_PROMPT_SCRIPT_NAME).run()
    
>       assert len(vertexai_script_session.request_history) >= 1
E       assert 0 >= 1
E        +  where 0 = len([])
E        +    where [] = <vertex_ai.tests.core.session.ApiSession object at 0x7f882319d350>.request_history

tests/test_execute_prompt/test_execute_prompt.py:110: AssertionError
tests/test_execute_prompt/test_execute_prompt.py::TestValid::test_valid_run
self = <vertex_ai.tests.test_execute_prompt.test_execute_prompt.TestValid object at 0x7f8823028c50>
vertexai_script_session = <vertex_ai.tests.core.session.ApiSession object at 0x7f8823742390>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f8824aee3b0>, _err=<_io.StringIO object at 0x7f8824aeda20>)

    @set_metadata(integration_config=CONFIG, parameters=ACTION_CONFIG)
    def test_valid_run(
        self,
        vertexai_script_session: ApiSession,
        action_output: MockActionOutput,
    ) -> None:
        action = ExecutePrompt(script_name=Constants.EXECUTE_PROMPT_SCRIPT_NAME)
        action.run()
    
>       assert len(vertexai_script_session.request_history) >= 2
E       assert 0 >= 2
E        +  where 0 = len([])
E        +    where [] = <vertex_ai.tests.core.session.ApiSession object at 0x7f8823742390>.request_history

tests/test_execute_prompt/test_execute_prompt.py:126: AssertionError
tests/test_ping.py::TestPing::test_success
self = <vertex_ai.tests.test_ping.TestPing object at 0x7f88233830d0>
vertexai_script_session = <vertex_ai.tests.core.session.ApiSession object at 0x7f882374ca90>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f8824aedbd0>, _err=<_io.StringIO object at 0x7f882314be20>)

    @set_metadata(
        integration_config=CONFIG
    )
    def test_success(
            self,
            vertexai_script_session: ApiSession,
            action_output: MockActionOutput,
    ) -> None:
        Ping(script_name=Constants.PING_SCRIPT_NAME).run()
    
>       assert len(vertexai_script_session.request_history) >= 1
E       assert 0 >= 1
E        +  where 0 = len([])
E        +    where [] = <vertex_ai.tests.core.session.ApiSession object at 0x7f882374ca90>.request_history

tests/test_ping.py:63: AssertionError
tests/test_ping.py::TestPing::test_invalid_email
self = <vertex_ai.tests.test_ping.TestPing object at 0x7f8823311490>
vertexai_script_session = <vertex_ai.tests.core.session.ApiSession object at 0x7f8823035a90>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f8822f9cc10>, _err=<_io.StringIO object at 0x7f8822f9de10>)

    @set_metadata(
        integration_config=CONFIG_WITH_INVALID_EMAIL
    )
    def test_invalid_email(
            self,
            vertexai_script_session: ApiSession,
            action_output: MockActionOutput,
    ) -> None:
        Ping(script_name=Constants.PING_SCRIPT_NAME).run()
    
>       assert len(vertexai_script_session.request_history) >= 1
E       assert 0 >= 1
E        +  where 0 = len([])
E        +    where [] = <vertex_ai.tests.core.session.ApiSession object at 0x7f8823035a90>.request_history

tests/test_ping.py:99: AssertionError
tests/test_transform_data/test_transform_data.py::TestAuth::test_invalid_email
self = <vertex_ai.tests.test_transform_data.test_transform_data.TestAuth object at 0x7f88231f4b50>
vertexai_script_session = <vertex_ai.tests.core.session.ApiSession object at 0x7f88231714d0>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f8822f9e440>, _err=<_io.StringIO object at 0x7f8822f9e290>)

    @set_metadata(integration_config=CONFIG_WITH_INVALID_EMAIL)
    def test_invalid_email(
        self,
        vertexai_script_session: ApiSession,
        action_output: MockActionOutput,
    ) -> None:
        TransformData().run()
    
>       assert len(vertexai_script_session.request_history) >= 1
E       assert 0 >= 1
E        +  where 0 = len([])
E        +    where [] = <vertex_ai.tests.core.session.ApiSession object at 0x7f88231714d0>.request_history

tests/test_transform_data/test_transform_data.py:88: AssertionError
tests/test_transform_data/test_transform_data.py::TestValid::test_valid
self = <vertex_ai.tests.test_transform_data.test_transform_data.TestValid object at 0x7f88231f64d0>
vertexai_script_session = <vertex_ai.tests.core.session.ApiSession object at 0x7f8822f02f10>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f8822f9e200>, _err=<_io.StringIO object at 0x7f8822f9c4c0>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG,
    )
    def test_valid(
        self,
        vertexai_script_session: ApiSession,
        action_output: MockActionOutput,
    ) -> None:
        TransformData().run()
    
>       assert len(vertexai_script_session.request_history) >= 3
E       assert 0 >= 3
E        +  where 0 = len([])
E        +    where [] = <vertex_ai.tests.core.session.ApiSession object at 0x7f8822f02f10>.request_history

tests/test_transform_data/test_transform_data.py:115: AssertionError
tests/test_transform_data/test_transform_data.py::TestValid::test_invalid_json
self = <vertex_ai.tests.test_transform_data.test_transform_data.TestValid object at 0x7f88231f6110>
vertexai_script_session = <vertex_ai.tests.core.session.ApiSession object at 0x7f88230aad10>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f8822f9cd30>, _err=<_io.StringIO object at 0x7f8822f9d2d0>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_WITH_INVALID_JSON,
    )
    def test_invalid_json(
        self,
        vertexai_script_session: ApiSession,
        action_output: MockActionOutput,
    ) -> None:
        action = TransformData()
        action.run()
    
>       assert len(vertexai_script_session.request_history) >= 2
E       assert 0 >= 2
E        +  where 0 = len([])
E        +    where [] = <vertex_ai.tests.core.session.ApiSession object at 0x7f88230aad10>.request_history

tests/test_transform_data/test_transform_data.py:133: AssertionError

🧩 pub_sub

✅ Passed ❌ Failed ⏭️ Skipped
2 6 0

❌ Failed Tests

tests/test_ping.py::TestPing::test_success
self = <pub_sub.tests.test_ping.TestPing object at 0x7efe429e0c90>
gcloud_pubsub_script_session = <pub_sub.tests.core.session.ApiSession object at 0x7efe428040d0>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7efe42958790>, _err=<_io.StringIO object at 0x7efe42959240>)

    @set_metadata(
        integration_config=CONFIG
    )
    def test_success(
            self,
            gcloud_pubsub_script_session: ApiSession,
            action_output: MockActionOutput,
    ) -> None:
        Ping(script_name=Constants.PING_SCRIPT_NAME).run()
    
>       assert len(gcloud_pubsub_script_session.request_history) >= 3
E       assert 0 >= 3
E        +  where 0 = len([])
E        +    where [] = <pub_sub.tests.core.session.ApiSession object at 0x7efe428040d0>.request_history

tests/test_ping.py:63: AssertionError
tests/test_ping.py::TestPing::test_invalid_email
self = <pub_sub.tests.test_ping.TestPing object at 0x7efe429e1890>
gcloud_pubsub_script_session = <pub_sub.tests.core.session.ApiSession object at 0x7efe428079d0>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7efe429596c0>, _err=<_io.StringIO object at 0x7efe429584c0>)

    @set_metadata(
        integration_config=CONFIG_WITH_INVALID_EMAIL
    )
    def test_invalid_email(
            self,
            gcloud_pubsub_script_session: ApiSession,
            action_output: MockActionOutput,
    ) -> None:
        Ping(script_name=Constants.PING_SCRIPT_NAME).run()
    
>       assert len(gcloud_pubsub_script_session.request_history) >= 2
E       assert 0 >= 2
E        +  where 0 = len([])
E        +    where [] = <pub_sub.tests.core.session.ApiSession object at 0x7efe428079d0>.request_history

tests/test_ping.py:99: AssertionError
tests/test_pubsub_connector.py::TestTestRun::test_connector_test_run_no_messages
self = <pub_sub.connectors.PubSubMessagesConnector.PubSubMessagesConnector object at 0x7efe429ce590>

    @output_handler
    def start(self) -> None:
        """
        Executes the connector logic.
    
        Execution steps:
    
            1. Extracting connector script parameters from the SDK connector object
            2. Validate parameters values
            3. Loading the connector context data via the SDK connector object
            4. Initializing the integrations manager(s)
            5. Fetching & parsing alerts from the product via integration manager
            6. Filtering the alerts
            7. Processing the filtered alerts into siemplify alerts
            8. Saving connector context data via the SDK connector object
            9. Sending newly created siemplify alerts to the platform
    
        Raises:
            ConnectorSetupError: if any of the pre-processing phases fail
        """
        self.logger.info(
            f"---------------- Starting connector {self.script_name} "
            "execution ----------------"
        )
        if self.is_test_run:
            self.logger.info(
                "****** This is an \"IDE Play Button\"\\\"Run Connector once\" "
                "test run ******"
            )
    
        self.logger.info(
            "------------------- Main - Param Init -------------------"
        )
        self.extract_params()
        self.logger.info(
            "------------------- Main - Started -------------------"
        )
        processed_alerts = []
    
        try:
            try:
                self.validate_params_wrapper()
                self.read_context_wrapper()
                self.logger.info("Initializing managers...")
>               self.init_managers()

connectors/PubSubMessagesConnector.py:214: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
connectors/PubSubMessagesConnector.py:67: in init_managers
    auth_manager = AuthManager(auth_manager_params, self.logger)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
core/PubSubAuthManager.py:153: in __init__
    self.credentials = build_credentials_from_sa(
.venv/lib/python3.11/site-packages/TIPCommon/rest/auth.py:224: in build_credentials_from_sa
    creds = get_impersonated_credentials(
.venv/lib/python3.11/site-packages/TIPCommon/rest/auth.py:361: in get_impersonated_credentials
    source_credentials = get_adc()[0]
                         ^^^^^^^^^
.venv/lib/python3.11/site-packages/TIPCommon/rest/auth.py:158: in get_adc
    return google.auth.default(scopes, request, quota_project_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/_default.py:714: in default
    credentials, project_id = checker()
                              ^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/_default.py:710: in <lambda>
    lambda: _get_gce_credentials(request, quota_project_id=quota_project_id),
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/_default.py:406: in _get_gce_credentials
    if _metadata.is_on_gce(request=request):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/compute_engine/_metadata.py:138: in is_on_gce
    if ping(request):
       ^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/compute_engine/_metadata.py:221: in ping
    response = request(
.venv/lib/python3.11/site-packages/google/auth/transport/requests.py:188: in __call__
    response = self.session.request(
.venv/lib/python3.11/site-packages/integration_testing/requests/session.py:89: in request
    response: MockResponse = self._do_request(method, request)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/integration_testing/requests/session.py:125: in _do_request
    self._validate_response(response, method, path)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pub_sub.tests.core.session.ApiSession object at 0x7efe42806a50>
response = <object object at 0x7efe4692efa0>, method = 'GET', path = ''

    def _validate_response(
        self,
        response: Response,
        method: str,
        path: str,
    ) -> None:
        msg: str
        if response is None or response is NotImplemented:
            msg = (
                "Null or UnImplemented Response!"
                f" Request with method '{method}' to URL '{path}'"
                f" returned {response!r} instead of a response object."
                " Perhaps you forgot to return a response object in the correlating"
                " router."
            )
            raise RuntimeError(msg)
    
        if response is NO_RESPONSE:
            msg = (
                f"path '{path}' doesn't match with any of the other '{method}' "
                f"routes patterns: {list(self.routes[method].keys())}"
            )
>           raise ValueError(msg)
E           ValueError: path '' doesn't match with any of the other 'GET' routes patterns: ['/v1/projects/test-project/subscriptions/([a-zA-Z]|-|_)+', '/v1/projects/test-project/topics/([a-zA-Z]|-|_)+', '/computeMetadata/v1/instance/service-accounts/default/?$', '/computeMetadata/v1/instance/service-accounts/default/email', '/computeMetadata/v1/instance/service-accounts/(\\w|-)+@([a-zA-Z]|-|\\.)+\\.com/token']

.venv/lib/python3.11/site-packages/integration_testing/requests/session.py:150: ValueError

The above exception was the direct cause of the following exception:

self = <pub_sub.tests.test_pubsub_connector.TestTestRun object at 0x7efe42814390>
gcloud_pubsub_script_session = <pub_sub.tests.core.session.ApiSession object at 0x7efe42806a50>
connector_output = <integration_testing.platform.script_output.MockConnectorOutput object at 0x7efe432105e0>

    @set_metadata(
            connector_def_file_path=DEF_PATH,
            parameters=DEFAULT_PARAMETERS,
            integration_config=CONFIG,
            input_context={"integrationContext": CONFIG}
    )
    def test_connector_test_run_no_messages(
            self,
            gcloud_pubsub_script_session: ApiSession,
            connector_output: MockConnectorOutput,
    ) -> None:
        set_is_test_run_to_true()
        connector = PubSubMessagesConnector()
        connector.siemplify.context.connector_info.identifier = (
            TEST_CONNECTOR_IDENTIFIER
        )
>       connector.start()

tests/test_pubsub_connector.py:83: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.venv/lib/python3.11/site-packages/soar_sdk/SiemplifyUtils.py:117: in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pub_sub.connectors.PubSubMessagesConnector.PubSubMessagesConnector object at 0x7efe429ce590>

    @output_handler
    def start(self) -> None:
        """
        Executes the connector logic.
    
        Execution steps:
    
            1. Extracting connector script parameters from the SDK connector object
            2. Validate parameters values
            3. Loading the connector context data via the SDK connector object
            4. Initializing the integrations manager(s)
            5. Fetching & parsing alerts from the product via integration manager
            6. Filtering the alerts
            7. Processing the filtered alerts into siemplify alerts
            8. Saving connector context data via the SDK connector object
            9. Sending newly created siemplify alerts to the platform
    
        Raises:
            ConnectorSetupError: if any of the pre-processing phases fail
        """
        self.logger.info(
            f"---------------- Starting connector {self.script_name} "
            "execution ----------------"
        )
        if self.is_test_run:
            self.logger.info(
                "****** This is an \"IDE Play Button\"\\\"Run Connector once\" "
                "test run ******"
            )
    
        self.logger.info(
            "------------------- Main - Param Init -------------------"
        )
        self.extract_params()
        self.logger.info(
            "------------------- Main - Started -------------------"
        )
        processed_alerts = []
    
        try:
            try:
                self.validate_params_wrapper()
                self.read_context_wrapper()
                self.logger.info("Initializing managers...")
                self.init_managers()
    
            # pylint: disable=try-except-raise
            except (
                BadGatewayError,
                DeadlineExceededError,
                ResourceExhaustedError,
                UnavailableError,
            ):
                raise
            except Exception as e:
>               raise ConnectorSetupError(e) from e
E               TIPCommon.exceptions.ConnectorSetupError: path '' doesn't match with any of the other 'GET' routes patterns: ['/v1/projects/test-project/subscriptions/([a-zA-Z]|-|_)+', '/v1/projects/test-project/topics/([a-zA-Z]|-|_)+', '/computeMetadata/v1/instance/service-accounts/default/?$', '/computeMetadata/v1/instance/service-accounts/default/email', '/computeMetadata/v1/instance/service-accounts/(\\w|-)+@([a-zA-Z]|-|\\.)+\\.com/token']

connectors/PubSubMessagesConnector.py:225: ConnectorSetupError
tests/test_pubsub_connector.py::TestConnectorExternalContext::test_connector_test_run_with_messages_no_context
self = <pub_sub.connectors.PubSubMessagesConnector.PubSubMessagesConnector object at 0x7efe42b06fd0>

    @output_handler
    def start(self) -> None:
        """
        Executes the connector logic.
    
        Execution steps:
    
            1. Extracting connector script parameters from the SDK connector object
            2. Validate parameters values
            3. Loading the connector context data via the SDK connector object
            4. Initializing the integrations manager(s)
            5. Fetching & parsing alerts from the product via integration manager
            6. Filtering the alerts
            7. Processing the filtered alerts into siemplify alerts
            8. Saving connector context data via the SDK connector object
            9. Sending newly created siemplify alerts to the platform
    
        Raises:
            ConnectorSetupError: if any of the pre-processing phases fail
        """
        self.logger.info(
            f"---------------- Starting connector {self.script_name} "
            "execution ----------------"
        )
        if self.is_test_run:
            self.logger.info(
                "****** This is an \"IDE Play Button\"\\\"Run Connector once\" "
                "test run ******"
            )
    
        self.logger.info(
            "------------------- Main - Param Init -------------------"
        )
        self.extract_params()
        self.logger.info(
            "------------------- Main - Started -------------------"
        )
        processed_alerts = []
    
        try:
            try:
                self.validate_params_wrapper()
                self.read_context_wrapper()
                self.logger.info("Initializing managers...")
>               self.init_managers()

connectors/PubSubMessagesConnector.py:214: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
connectors/PubSubMessagesConnector.py:67: in init_managers
    auth_manager = AuthManager(auth_manager_params, self.logger)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
core/PubSubAuthManager.py:153: in __init__
    self.credentials = build_credentials_from_sa(
.venv/lib/python3.11/site-packages/TIPCommon/rest/auth.py:224: in build_credentials_from_sa
    creds = get_impersonated_credentials(
.venv/lib/python3.11/site-packages/TIPCommon/rest/auth.py:361: in get_impersonated_credentials
    source_credentials = get_adc()[0]
                         ^^^^^^^^^
.venv/lib/python3.11/site-packages/TIPCommon/rest/auth.py:158: in get_adc
    return google.auth.default(scopes, request, quota_project_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/_default.py:714: in default
    credentials, project_id = checker()
                              ^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/_default.py:710: in <lambda>
    lambda: _get_gce_credentials(request, quota_project_id=quota_project_id),
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/_default.py:406: in _get_gce_credentials
    if _metadata.is_on_gce(request=request):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/compute_engine/_metadata.py:138: in is_on_gce
    if ping(request):
       ^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/google/auth/compute_engine/_metadata.py:221: in ping
    response = request(
.venv/lib/python3.11/site-packages/google/auth/transport/requests.py:188: in __call__
    response = self.session.request(
.venv/lib/python3.11/site-packages/integration_testing/requests/session.py:89: in request
    response: MockResponse = self._do_request(method, request)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.11/site-packages/integration_testing/requests/session.py:125: in _do_request
    self._validate_response(response, method, path)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pub_sub.tests.core.session.ApiSession object at 0x7efe42f484d0>
response = <object object at 0x7efe4692efa0>, method = 'GET', path = ''

    def _validate_response(
        self,
        response: Response,
        method: str,
        path: str,
    ) -> None:
        msg: str
        if response is None or response is NotImplemented:
            msg = (
                "Null or UnImplemented Response!"
                f" Request with method '{method}' to URL '{path}'"
                f" returned {response!r} instead of a response object."
                " Perhaps you forgot to return a response object in the correlating"
                " router."
            )
            raise RuntimeError(msg)
    
        if response is NO_RESPONSE:
            msg = (
                f"path '{path}' doesn't match with any of the other '{method}' "
                f"routes patterns: {list(self.routes[method].keys())}"
            )
>           raise ValueError(msg)
E           ValueError: path '' doesn't match with any of the other 'GET' routes patterns: ['/v1/projects/test-project/subscriptions/([a-zA-Z]|-|_)+', '/v1/projects/test-project/topics/([a-zA-Z]|-|_)+', '/computeMetadata/v1/instance/service-accounts/default/?$', '/computeMetadata/v1/instance/service-accounts/default/email', '/computeMetadata/v1/instance/service-accounts/(\\w|-)+@([a-zA-Z]|-|\\.)+\\.com/token']

.venv/lib/python3.11/site-packages/integration_testing/requests/session.py:150: ValueError

The above exception was the direct cause of the following exception:

self = <pub_sub.tests.test_pubsub_connector.TestConnectorExternalContext object at 0x7efe428151d0>
gcloud_pubsub_script_session = <pub_sub.tests.core.session.ApiSession object at 0x7efe42f484d0>
connector_output = <integration_testing.platform.script_output.MockConnectorOutput object at 0x7efe42b19210>
product = Product(messages=[{'ackId': 'FixdRkhRNxkIaFEOT14jPzUgKEURBQBPAihdeTdUO0FdfAc-DRlyfWF0Y1kVCQFGAHlbXBEMb1ZcZzZRFbnF2utDS...sdWUiOiAicHJvamVjdC1sZXZlbCIKICB9XQp9', 'messageId': '12753109718606507', 'publishTime': '2024-11-26T11:22:48.957Z'}}])
external_context = MockExternalContext(_rows={})

    @set_metadata(
        connector_def_file_path=DEF_PATH,
        parameters=DEFAULT_PARAMETERS,
        external_context=MockExternalContext(),
        integration_config=CONFIG,
        input_context={"integrationContext": CONFIG}
    )
    def test_connector_test_run_with_messages_no_context(
            self,
            gcloud_pubsub_script_session: ApiSession,
            connector_output: MockConnectorOutput,
            product: Product,
            external_context: MockExternalContext,
    ) -> None:
        product.set_messages(MOCK_DATA["one_test_one_real"])
        set_is_test_run_to_true()
        connector = PubSubMessagesConnector()
        connector.siemplify.context.connector_info.identifier = (
            TEST_CONNECTOR_IDENTIFIER
        )
>       connector.start()

tests/test_pubsub_connector.py:112: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.venv/lib/python3.11/site-packages/soar_sdk/SiemplifyUtils.py:117: in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pub_sub.connectors.PubSubMessagesConnector.PubSubMessagesConnector object at 0x7efe42b06fd0>

    @output_handler
    def start(self) -> None:
        """
        Executes the connector logic.
    
        Execution steps:
    
            1. Extracting connector script parameters from the SDK connector object
            2. Validate parameters values
            3. Loading the connector context data via the SDK connector object
            4. Initializing the integrations manager(s)
            5. Fetching & parsing alerts from the product via integration manager
            6. Filtering the alerts
            7. Processing the filtered alerts into siemplify alerts
            8. Saving connector context data via the SDK connector object
            9. Sending newly created siemplify alerts to the platform
    
        Raises:
            ConnectorSetupError: if any of the pre-processing phases fail
        """
        self.logger.info(
            f"---------------- Starting connector {self.script_name} "
            "execution ----------------"
        )
        if self.is_test_run:
            self.logger.info(
                "****** This is an \"IDE Play Button\"\\\"Run Connector once\" "
                "test run ******"
            )
    
        self.logger.info(
            "------------------- Main - Param Init -------------------"
        )
        self.extract_params()
        self.logger.info(
            "------------------- Main - Started -------------------"
        )
        processed_alerts = []
    
        try:
            try:
                self.validate_params_wrapper()
                self.read_context_wrapper()
                self.logger.info("Initializing managers...")
                self.init_managers()
    
            # pylint: disable=try-except-raise
            except (
                BadGatewayError,
                DeadlineExceededError,
                ResourceExhaustedError,
                UnavailableError,
            ):
                raise
            except Exception as e:
>               raise ConnectorSetupError(e) from e
E               TIPCommon.exceptions.ConnectorSetupError: path '' doesn't match with any of the other 'GET' routes patterns: ['/v1/projects/test-project/subscriptions/([a-zA-Z]|-|_)+', '/v1/projects/test-project/topics/([a-zA-Z]|-|_)+', '/computeMetadata/v1/instance/service-accounts/default/?$', '/computeMetadata/v1/instance/service-accounts/default/email', '/computeMetadata/v1/instance/service-accounts/(\\w|-)+@([a-zA-Z]|-|\\.)+\\.com/token']

connectors/PubSubMessagesConnector.py:225: ConnectorSetupError
tests/test_pubsub_connector.py::TestConnectorExternalContext::test_connector_run_with_messages_ids
self = <pub_sub.tests.test_pubsub_connector.TestConnectorExternalContext object at 0x7efe42814d50>
gcloud_pubsub_script_session = <pub_sub.tests.core.session.ApiSession object at 0x7efe42f48bd0>
connector_output = <integration_testing.platform.script_output.MockConnectorOutput object at 0x7efe44965720>
product = Product(messages=[{'ackId': 'FixdRkhRNxkIaFEOT14jPzUgKEURBQBPAihdeTdUO0FdfAc-DRlyfWF0Y1kVCQFGAHlbXBEMb1ZcZzZRFbnF2utDS...sdWUiOiAicHJvamVjdC1sZXZlbCIKICB9XQp9', 'messageId': '12753109718606507', 'publishTime': '2024-11-26T11:22:48.957Z'}}])
external_context = MockExternalContext(_rows={})

    @set_metadata(
            connector_def_file_path=DEF_PATH,
            parameters=DEFAULT_PARAMETERS,
            external_context=MockExternalContext(),
            integration_config=CONFIG,
            input_context={"integrationContext": CONFIG}
    )
    def test_connector_run_with_messages_ids(
            self,
            gcloud_pubsub_script_session: ApiSession,
            connector_output: MockConnectorOutput,
            product: Product,
            external_context: MockExternalContext,
    ) -> None:
        product.set_messages(MOCK_DATA["one_test_one_real"])
        set_is_test_run_to_false()
        connector = PubSubMessagesConnector()
        connector.siemplify.context.connector_info.identifier = (
            TEST_CONNECTOR_IDENTIFIER
        )
        connector.start()
    
>       assert len(gcloud_pubsub_script_session.request_history) == 6
E       assert 0 == 6
E        +  where 0 = len([])
E        +    where [] = <pub_sub.tests.core.session.ApiSession object at 0x7efe42f48bd0>.request_history

tests/test_pubsub_connector.py:149: AssertionError
tests/test_pubsub_connector.py::TestConnectorExternalContext::test_connector_run_with_messages_ids_and_non_json
self = <pub_sub.tests.test_pubsub_connector.TestConnectorExternalContext object at 0x7efe42815810>
gcloud_pubsub_script_session = <pub_sub.tests.core.session.ApiSession object at 0x7efe42944590>
connector_output = <integration_testing.platform.script_output.MockConnectorOutput object at 0x7efe44722410>
product = Product(messages=[{'ackId': 'FixdRkhRNxkIaFEOT14jPzUgKEURBQBPAihdeTdUO0FdfAc-DRlyfWF0Y1kVCQFGAHlbXBEMb1ZcZzZRFbnF2utDS...'data': 'SW52YWxpZCBib2R5IG1lc3NhZ2U=', 'messageId': '12757464662191808', 'publishTime': '2024-11-27T12:53:52.695Z'}}])
external_context = MockExternalContext(_rows={})

    @set_metadata(
            connector_def_file_path=DEF_PATH,
            parameters=DEFAULT_PARAMETERS,
            external_context=MockExternalContext(),
            integration_config=CONFIG,
            input_context={"integrationContext": CONFIG}
    )
    def test_connector_run_with_messages_ids_and_non_json(
            self,
            gcloud_pubsub_script_session: ApiSession,
            connector_output: MockConnectorOutput,
            product: Product,
            external_context: MockExternalContext,
    ) -> None:
        product.set_messages(MOCK_DATA["two_real_one_broken"])
        set_is_test_run_to_false()
        connector = PubSubMessagesConnector()
        connector.siemplify.context.connector_info.identifier = (
            TEST_CONNECTOR_IDENTIFIER
        )
        connector.start()
    
>       assert len(gcloud_pubsub_script_session.request_history) == 5
E       assert 0 == 5
E        +  where 0 = len([])
E        +    where [] = <pub_sub.tests.core.session.ApiSession object at 0x7efe42944590>.request_history

tests/test_pubsub_connector.py:197: AssertionError

🧩 okta

✅ Passed ❌ Failed ⏭️ Skipped
0 1 0

❌ Failed Tests

Test Execution Failure
JSON report not found at /home/runner/work/content-hub/content-hub/content/response_integrations/google/okta/.report.json. The test execution script might have failed before running pytest.

🧩 web_risk

✅ Passed ❌ Failed ⏭️ Skipped
4 10 0

❌ Failed Tests

tests/test_enrich_entities/test_enrich_entities.py::TestAuth::test_invalid_email
self = <web_risk.tests.test_enrich_entities.test_enrich_entities.TestAuth object at 0x7f4eeaed4a50>
script_session = <web_risk.tests.core.session.ApiSession object at 0x7f4eead7eed0>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4eeaef1c60>, _err=<_io.StringIO object at 0x7f4eeaef1ea0>)

    @set_metadata(
        integration_config=CONFIG_WITH_INVALID_EMAIL
    )
    def test_invalid_email(
            self,
            script_session: ApiSession,
            action_output: MockActionOutput,
    ) -> None:
        EnrichEntities().run()
    
>       assert len(script_session.request_history) >= 2
E       assert 0 >= 2
E        +  where 0 = len([])
E        +    where [] = <web_risk.tests.core.session.ApiSession object at 0x7f4eead7eed0>.request_history

tests/test_enrich_entities/test_enrich_entities.py:92: AssertionError
tests/test_enrich_entities/test_enrich_entities.py::TestEnrichment::test_no_entities
self = <web_risk.tests.test_enrich_entities.test_enrich_entities.TestEnrichment object at 0x7f4eeaed4b90>
script_session = <web_risk.tests.core.session.ApiSession object at 0x7f4eead8a850>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4eeaef1bd0>, _err=<_io.StringIO object at 0x7f4eeaef1d80>)

    @set_metadata(
        integration_config=CONFIG
    )
    def test_no_entities(
            self,
            script_session: ApiSession,
            action_output: MockActionOutput,
    ) -> None:
        EnrichEntities().run()
    
>       assert len(script_session.request_history) >= 2
E       assert 0 >= 2
E        +  where 0 = len([])
E        +    where [] = <web_risk.tests.core.session.ApiSession object at 0x7f4eead8a850>.request_history

tests/test_enrich_entities/test_enrich_entities.py:116: AssertionError
tests/test_enrich_entities/test_enrich_entities.py::TestEnrichment::test_valid_invalid
self = <web_risk.tests.test_enrich_entities.test_enrich_entities.TestEnrichment object at 0x7f4eeaed54d0>
script_session = <web_risk.tests.core.session.ApiSession object at 0x7f4eead8bc90>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4eeaef20e0>, _err=<_io.StringIO object at 0x7f4eeaef27a0>)
product = Product(_threat_types_map={'https%3A//testsafebrowsing.appspot.com/s/malware.html': ['MALWARE']})

    @set_metadata(
        integration_config=CONFIG,
        entities=[
            DomainEntityInfo(
                identifier="https://domaiN.com",
                additional_properties={
                    "Environment": "Default Environment",
                    "OriginalIdentifier": "https://domain.com",
                },
                alert_identifier="test-alert",
                case_identifier=1,
                creation_time=unix_now(),
                modification_time=unix_now(),
                entity_type=EntityTypesEnum.URL.value,
                is_pivot=False,
                is_artifact=False,
                is_enriched=False,
                is_internal=False,
                is_suspicious=False,
                is_vulnerable=False,
            ),
            DomainEntityInfo(
                identifier="https://testSafebrowsing.appspot.com/s/malware.html",
                additional_properties={
                    "Environment": "Default Environment",
                    "OriginalIdentifier": (
                        "https://testsafebrowsing.appspot.com/s/malware.html"
                    )
                },
                alert_identifier="test-alert",
                case_identifier=1,
                creation_time=unix_now(),
                modification_time=unix_now(),
                entity_type=EntityTypesEnum.URL.value,
                is_pivot=False,
                is_artifact=False,
                is_enriched=False,
                is_internal=False,
                is_suspicious=False,
                is_vulnerable=False,
            )
        ]
    )
    def test_valid_invalid(
            self,
            script_session: ApiSession,
            action_output: MockActionOutput,
            product: Product,
    ) -> None:
        product.add_uri(
            quote("https://testsafebrowsing.appspot.com/s/malware.html"),
            ["MALWARE", ],
        )
    
        action_ = EnrichEntities()
        action_.soar_action.execution_deadline_unix_time_ms = unix_now() + 60_000
        action_.soar_action.session = script_session
        action_.run()
    
>       assert len(script_session.request_history) >= 5
E       assert 0 >= 5
E        +  where 0 = len([])
E        +    where [] = <web_risk.tests.core.session.ApiSession object at 0x7f4eead8bc90>.request_history

tests/test_enrich_entities/test_enrich_entities.py:183: AssertionError
tests/test_ping.py::TestPing::test_success
self = <web_risk.tests.test_ping.TestPing object at 0x7f4eeae901d0>
script_session = <web_risk.tests.core.session.ApiSession object at 0x7f4eead4c350>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4eeaef39a0>, _err=<_io.StringIO object at 0x7f4eeaef3d00>)

    @set_metadata(
        integration_config=CONFIG
    )
    def test_success(
            self,
            script_session: ApiSession,
            action_output: MockActionOutput,
    ) -> None:
        Ping(script_name=Constants.PING_SCRIPT_NAME).run()
    
>       assert len(script_session.request_history) >= 3
E       assert 0 >= 3
E        +  where 0 = len([])
E        +    where [] = <web_risk.tests.core.session.ApiSession object at 0x7f4eead4c350>.request_history

tests/test_ping.py:63: AssertionError
tests/test_ping.py::TestPing::test_invalid_email
self = <web_risk.tests.test_ping.TestPing object at 0x7f4eeae90e90>
script_session = <web_risk.tests.core.session.ApiSession object at 0x7f4eeaebd4d0>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4eecbc3640>, _err=<_io.StringIO object at 0x7f4eecbc2560>)

    @set_metadata(
        integration_config=CONFIG_WITH_INVALID_EMAIL
    )
    def test_invalid_email(
            self,
            script_session: ApiSession,
            action_output: MockActionOutput,
    ) -> None:
        Ping(script_name=Constants.PING_SCRIPT_NAME).run()
    
>       assert len(script_session.request_history) >= 2
E       assert 0 >= 2
E        +  where 0 = len([])
E        +    where [] = <web_risk.tests.core.session.ApiSession object at 0x7f4eeaebd4d0>.request_history

tests/test_ping.py:103: AssertionError
tests/test_submit_entities/test_submit_entities.py::TestAuth::test_invalid_email
self = <web_risk.tests.test_submit_entities.test_submit_entities.TestAuth object at 0x7f4eead69fd0>
script_session = <web_risk.tests.core.session.ApiSession object at 0x7f4eeb502710>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4eecbc3520>, _err=<_io.StringIO object at 0x7f4eecbc3490>)

    @set_metadata(
        integration_config=CONFIG_WITH_INVALID_EMAIL
    )
    def test_invalid_email(
            self,
            script_session: ApiSession,
            action_output: MockActionOutput,
    ) -> None:
        SubmitEntities().run()
    
>       assert len(script_session.request_history) >= 2
E       assert 0 >= 2
E        +  where 0 = len([])
E        +    where [] = <web_risk.tests.core.session.ApiSession object at 0x7f4eeb502710>.request_history

tests/test_submit_entities/test_submit_entities.py:103: AssertionError
tests/test_submit_entities/test_submit_entities.py::TestEnrichment::test_no_entities
self = <web_risk.tests.test_submit_entities.test_submit_entities.TestEnrichment object at 0x7f4eead6a850>
script_session = <web_risk.tests.core.session.ApiSession object at 0x7f4eeae61d10>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4eecbc3880>, _err=<_io.StringIO object at 0x7f4eec7d43a0>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG,
    )
    def test_no_entities(
            self,
            script_session: ApiSession,
            action_output: MockActionOutput,
    ) -> None:
        SubmitEntities().run()
    
>       assert len(script_session.request_history) >= 2
E       assert 0 >= 2
E        +  where 0 = len([])
E        +    where [] = <web_risk.tests.core.session.ApiSession object at 0x7f4eeae61d10>.request_history

tests/test_submit_entities/test_submit_entities.py:128: AssertionError
tests/test_submit_entities/test_submit_entities.py::TestEnrichment::test_valid_invalid
self = <web_risk.tests.test_submit_entities.test_submit_entities.TestEnrichment object at 0x7f4eead6b050>
script_session = <web_risk.tests.core.session.ApiSession object at 0x7f4eeb07fcd0>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4eec7d4f70>, _err=<_io.StringIO object at 0x7f4eec7d57e0>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG,
        entities=[
            DomainEntityInfo(
                identifier="https://domaiN.com",
                additional_properties={
                    "Environment": "Default Environment",
                    "OriginalIdentifier": "https://domain.com",
                },
                alert_identifier="test-alert",
                case_identifier=1,
                creation_time=unix_now(),
                modification_time=unix_now(),
                entity_type=EntityTypesEnum.URL.value,
                is_pivot=False,
                is_artifact=False,
                is_enriched=False,
                is_internal=False,
                is_suspicious=False,
                is_vulnerable=False,
            ),
            DomainEntityInfo(
                identifier="https://testSafebrowsing.appspot.com/s/malware.html",
                additional_properties={
                    "Environment": "Default Environment",
                    "OriginalIdentifier": (
                        "https://testsafebrowsing.appspot.com/s/malware.html"
                    )
                },
                alert_identifier="test-alert",
                case_identifier=1,
                creation_time=unix_now(),
                modification_time=unix_now(),
                entity_type=EntityTypesEnum.URL.value,
                is_pivot=False,
                is_artifact=False,
                is_enriched=False,
                is_internal=False,
                is_suspicious=False,
                is_vulnerable=False,
            )
        ]
    )
    def test_valid_invalid(
            self,
            script_session: ApiSession,
            action_output: MockActionOutput,
    ) -> None:
        set_is_first_run_to_true()
        action_ = SubmitEntities()
        action_.soar_action.execution_deadline_unix_time_ms = unix_now() + 60_000
        action_.soar_action.async_total_duration_deadline = unix_now() + 60_000
        action_.soar_action.session = script_session
        action_.run()
    
>       assert len(script_session.request_history) >= 4
E       assert 0 >= 4
E        +  where 0 = len([])
E        +    where [] = <web_risk.tests.core.session.ApiSession object at 0x7f4eeb07fcd0>.request_history

tests/test_submit_entities/test_submit_entities.py:192: AssertionError
tests/test_submit_entities/test_submit_entities.py::TestEnrichment::test_second_run
self = <web_risk.tests.test_submit_entities.test_submit_entities.TestEnrichment object at 0x7f4eead6b550>
script_session = <web_risk.tests.core.session.ApiSession object at 0x7f4eeb1c8e50>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4eec7d5ea0>, _err=<_io.StringIO object at 0x7f4eec7d6050>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_RUNNING,
        entities=[
            DomainEntityInfo(
                identifier="https://testSafebrowsing.appspot.com/s/malware.html",
                additional_properties={
                    "Environment": "Default Environment",
                    "OriginalIdentifier": (
                        "https://testsafebrowsing.appspot.com/s/malware.html"
                    )
                },
                alert_identifier="test-alert",
                case_identifier=1,
                creation_time=unix_now(),
                modification_time=unix_now(),
                entity_type=EntityTypesEnum.URL.value,
                is_pivot=False,
                is_artifact=False,
                is_enriched=False,
                is_internal=False,
                is_suspicious=False,
                is_vulnerable=False,
            )
        ]
    )
    def test_second_run(
            self,
            script_session: ApiSession,
            action_output: MockActionOutput,
    ) -> None:
        set_is_first_run_to_false()
        action_ = SubmitEntities()
        action_.soar_action.execution_deadline_unix_time_ms = unix_now() + 60_000
        action_.soar_action.async_total_duration_deadline = unix_now() + 60_000
        action_.soar_action.session = script_session
        action_.run()
    
>       assert len(script_session.request_history) >= 3
E       assert 0 >= 3
E        +  where 0 = len([])
E        +    where [] = <web_risk.tests.core.session.ApiSession object at 0x7f4eeb1c8e50>.request_history

tests/test_submit_entities/test_submit_entities.py:249: AssertionError
tests/test_submit_entities/test_submit_entities.py::TestEnrichment::test_second_run_timeout
self = <web_risk.tests.test_submit_entities.test_submit_entities.TestEnrichment object at 0x7f4eead6b2d0>
script_session = <web_risk.tests.core.session.ApiSession object at 0x7f4eead70bd0>
action_output = MockActionOutput(_out=<_io.StringIO object at 0x7f4eecbc3880>, _err=<_io.StringIO object at 0x7f4eecbc3640>)

    @set_metadata(
        integration_config=CONFIG,
        parameters=ACTION_CONFIG_RUNNING,
        entities=[
            DomainEntityInfo(
                identifier="https://testSafebrowsing.appspot.com/s/malware.html",
                additional_properties={
                    "Environment": "Default Environment",
                    "OriginalIdentifier": (
                        "https://testsafebrowsing.appspot.com/s/malware.html"
                    )
                },
                alert_identifier="test-alert",
                case_identifier=1,
                creation_time=unix_now(),
                modification_time=unix_now(),
                entity_type=EntityTypesEnum.URL.value,
                is_pivot=False,
                is_artifact=False,
                is_enriched=False,
                is_internal=False,
                is_suspicious=False,
                is_vulnerable=False,
            )
        ]
    )
    def test_second_run_timeout(
            self,
            script_session: ApiSession,
            action_output: MockActionOutput,
    ) -> None:
        set_is_first_run_to_false()
        action_ = SubmitEntities()
        action_.soar_action.execution_deadline_unix_time_ms = unix_now() + 60_000
        action_.soar_action.session = script_session
        action_.run()
    
>       assert len(script_session.request_history) >= 2
E       assert 0 >= 2
E        +  where 0 = len([])
E        +    where [] = <web_risk.tests.core.session.ApiSession object at 0x7f4eead70bd0>.request_history

tests/test_submit_entities/test_submit_entities.py:299: AssertionError

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants