From 99792c18b174f5b9e435d3018d4f1e6f85bb7c7d Mon Sep 17 00:00:00 2001 From: SeanScripts Date: Mon, 10 Jul 2023 18:03:28 +0000 Subject: [PATCH] Return page list instead of set; update test fixtures --- src/dfcx_scrapi/tools/agent_checker_util.py | 2 +- tests/conftest.py | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/dfcx_scrapi/tools/agent_checker_util.py b/src/dfcx_scrapi/tools/agent_checker_util.py index 0a8a9cc3..64581f1b 100644 --- a/src/dfcx_scrapi/tools/agent_checker_util.py +++ b/src/dfcx_scrapi/tools/agent_checker_util.py @@ -827,4 +827,4 @@ def find_all_unreachable_intents(self) -> List[str]: include_groups=True) all_reachable_intents.update(set(flow_intents)) all_intents = {intent.display_name for intent in self._intent_data} - return all_intents - all_reachable_intents + return list(all_intents - all_reachable_intents) diff --git a/tests/conftest.py b/tests/conftest.py index dcb1a90e..20b7eff4 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -15,6 +15,7 @@ # limitations under the License. import pytest +import json def pytest_addoption(parser): """Method to add option for creds in tests.""" @@ -22,6 +23,8 @@ def pytest_addoption(parser): parser.addoption("--project_id", action="store") parser.addoption("--gcs_bucket", action="store") parser.addoption("--agent_id", action="store") + parser.addoption("--flow_name", action="store") + parser.addoption("--page_name", action="store") @pytest.fixture(scope="session") @@ -42,3 +45,11 @@ def gcs_bucket(request): @pytest.fixture(scope="session") def agent_id(request): return request.config.getoption("agent_id") + +@pytest.fixture(scope="session") +def flow_name(request): + return request.config.getoption("flow_name") + +@pytest.fixture(scope="session") +def page_name(request): + return request.config.getoption("page_name") \ No newline at end of file