Prepares the test by creating a session and running the runner.
(self, original_user_input="Hello")
| 946 | ) |
| 947 | |
| 948 | async def run_test(self, original_user_input="Hello") -> list[Event]: |
| 949 | """Prepares the test by creating a session and running the runner.""" |
| 950 | await self.session_service.create_session( |
| 951 | app_name=TEST_APP_ID, user_id=TEST_USER_ID, session_id=TEST_SESSION_ID |
| 952 | ) |
| 953 | events = [] |
| 954 | async for event in self.runner.run_async( |
| 955 | user_id=TEST_USER_ID, |
| 956 | session_id=TEST_SESSION_ID, |
| 957 | new_message=types.Content( |
| 958 | role="user", parts=[types.Part(text=original_user_input)] |
| 959 | ), |
| 960 | ): |
| 961 | events.append(event) |
| 962 | return events |
| 963 | |
| 964 | @pytest.mark.asyncio |
| 965 | async def test_runner_is_initialized_with_plugins(self): |
no test coverage detected