adk-python/tests/unittests
Yongsul Kim c024ac5762 Align event filtering and ordering logic
Copybara import of the project:

--
d01a8fd5f079bc4fca9e4b71796dbe65312ce9ff by Leo Yongsul Kim <ystory84@gmail.com>:

fix(DatabaseSessionService): Align event filtering and ordering logic

This commit addresses inconsistencies in how DatabaseSessionService
handles config.after_timestamp and config.num_recent_events
parameters, aligning its behavior with InMemorySessionService and
VertexAiSessionService.

Key changes:
- Made after_timestamp filtering inclusive
- Corrected num_recent_events behavior to fetch the N most recent events
- Refined timezone handling for after_timestamp
- Updated the unit test test_get_session_with_config to includeSessionServiceType.DATABASE, allowing verification of these fixes.

Fixes #911

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/915 from ystory:fix/database-session-timestamp-recency 5cc8cf5f5a5c0cb3e87f6ab178a5725d3f696c88
PiperOrigin-RevId: 763874840
2025-05-27 11:22:04 -07:00
..
agents chore: reformat the codes using autoformat.sh 2025-05-22 09:43:54 -07:00
artifacts chore: reformat the codes using autoformat.sh 2025-05-22 09:43:54 -07:00
auth chore: reformat the codes using autoformat.sh 2025-05-22 09:43:54 -07:00
cli chore: reformat the code with autoformat.sh 2025-05-25 20:33:45 -07:00
code_executors chore: reformat the codes using autoformat.sh 2025-05-22 09:43:54 -07:00
evaluation chore: reformat the codes using autoformat.sh 2025-05-22 09:43:54 -07:00
fast_api refactor: rename agent_dir to agents_dir and rename app_id to app_name in fast_api.py to make it consistent among every endpoints 2025-05-26 11:51:19 -07:00
flows chore: reformat the codes using autoformat.sh 2025-05-22 09:43:54 -07:00
models chore: reformat the codes using autoformat.sh 2025-05-22 09:43:54 -07:00
sessions Align event filtering and ordering logic 2025-05-27 11:22:04 -07:00
streaming Move public_utils to utils in tests 2025-05-21 16:35:11 -07:00
tools fix: fix bigquery credentials and bigquery tool to make it compatible with python 3.9 and make the credential serializable in session 2025-05-26 01:58:52 -07:00
utils Move public_utils to utils in tests 2025-05-21 16:35:11 -07:00
__init__.py Support async agent and model callbacks 2025-05-06 15:14:10 -07:00
conftest.py Moves unittests to root folder and adds github action to run unit tests. (#72) 2025-04-11 08:25:59 -07:00
testing_utils.py refactor: rename agent_dir to agents_dir and rename app_id to app_name in fast_api.py to make it consistent among every endpoints 2025-05-26 11:51:19 -07:00