From 0b00e6c02c12681a23c7281b7b9d456f072352aa Mon Sep 17 00:00:00 2001 From: Robert Jambrecic Date: Wed, 10 Jul 2024 15:09:33 +0200 Subject: [PATCH] Add test_google_sheets_real_fastapi_team_end2end test --- .../teams/test_gbb_google_sheets_team.py | 35 +++++++++++++++---- 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/tests/ci/captn/captn_agents/backend/teams/test_gbb_google_sheets_team.py b/tests/ci/captn/captn_agents/backend/teams/test_gbb_google_sheets_team.py index b97a9c6a..082a5274 100644 --- a/tests/ci/captn/captn_agents/backend/teams/test_gbb_google_sheets_team.py +++ b/tests/ci/captn/captn_agents/backend/teams/test_gbb_google_sheets_team.py @@ -47,13 +47,12 @@ def test_init(self, mock_get_conv_uuid: Iterator[Any]) -> None: team_class=GBBGoogleSheetsTeam, ) - @pytest.mark.flaky - @pytest.mark.openai - @pytest.mark.fastapi_openapi_team - def test_google_sheets_team_end2end( - self, google_sheets_fastapi_openapi_url: str, mock_get_conv_uuid: Iterator[Any] + def _test_google_sheets_team_end2end( + self, + user_id: int, + google_sheets_fastapi_openapi_url: str, + mock_get_conv_uuid: Iterator[Any], ) -> None: - user_id = 123 with mock_get_conv_uuid: google_sheets_team = GBBGoogleSheetsTeam( task="Do your job.", @@ -99,3 +98,27 @@ def test_google_sheets_team_end2end( assert ( len(expected_messages) == 0 ), f"Expected messages left: {expected_messages}" + + @pytest.mark.flaky + @pytest.mark.openai + @pytest.mark.fastapi_openapi_team + def test_google_sheets_team_end2end( + self, google_sheets_fastapi_openapi_url: str, mock_get_conv_uuid: Iterator[Any] + ) -> None: + self._test_google_sheets_team_end2end( + user_id=123, + google_sheets_fastapi_openapi_url=google_sheets_fastapi_openapi_url, + mock_get_conv_uuid=mock_get_conv_uuid, + ) + + @pytest.mark.flaky + @pytest.mark.openai + @pytest.mark.fastapi_openapi_team + def test_google_sheets_real_fastapi_team_end2end( + self, mock_get_conv_uuid: Iterator[Any] + ) -> None: + self._test_google_sheets_team_end2end( + user_id=13, + google_sheets_fastapi_openapi_url="https://google-sheets.tools.staging.fastagency.ai/openapi.json", + mock_get_conv_uuid=mock_get_conv_uuid, + )