From 78103f18df0d8f4d3043e18ba8df1a0cd9e6fcbd Mon Sep 17 00:00:00 2001 From: Ishaan Jaffer Date: Wed, 6 May 2026 16:18:28 -0700 Subject: [PATCH] test(agent_session_endpoints/conftest): support AND/OR operators in fake matcher --- .../proxy/agent_session_endpoints/conftest.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/test_litellm/proxy/agent_session_endpoints/conftest.py b/tests/test_litellm/proxy/agent_session_endpoints/conftest.py index 7c76336608e..dde13368a49 100644 --- a/tests/test_litellm/proxy/agent_session_endpoints/conftest.py +++ b/tests/test_litellm/proxy/agent_session_endpoints/conftest.py @@ -61,6 +61,15 @@ def _matches(row: _Row, where: Optional[Dict[str, Any]]) -> bool: if not where: return True for key, expected in where.items(): + # Compound boolean operators used by cursor pagination. + if key == "AND": + if not all(_matches(row, sub) for sub in expected): + return False + continue + if key == "OR": + if not any(_matches(row, sub) for sub in expected): + return False + continue actual = getattr(row, key, None) if isinstance(expected, dict): if "in" in expected: