fix: update conversation manager tests for auto-generated system message (#9687)
fix: update Anthropic mock to match real SDK's sync list() signature The real Anthropic SDK's models.list() is a regular (non-async) method that returns an AsyncPaginator (async-iterable). The mock used async def, causing `async for model in client.models.list()` to iterate over a coroutine instead of the page, silently failing with 0 models synced.
This commit is contained in:
@@ -880,6 +880,8 @@ async def test_server_startup_handles_api_errors_gracefully(default_user, defaul
|
||||
for item in self._items:
|
||||
yield item
|
||||
|
||||
# NOTE: The real SDK's models.list() is a regular (non-async) method that
|
||||
# returns an AsyncPaginator (which is async-iterable).
|
||||
class MockAnthropicModels:
|
||||
def list(self):
|
||||
return MockAnthropicAsyncPage(mock_anthropic_data)
|
||||
|
||||
Reference in New Issue
Block a user