mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-16 21:49:27 +00:00
minimize change
This commit is contained in:
parent
ed78090b8e
commit
06d02bf3de
23 changed files with 161 additions and 197 deletions
|
|
@ -98,8 +98,6 @@ async def test_responses_store_pagination_basic():
|
|||
assert result3.data[0].id == "zebra-resp"
|
||||
assert result3.has_more is False
|
||||
|
||||
await store.sql_store.close()
|
||||
|
||||
|
||||
async def test_responses_store_pagination_ascending():
|
||||
"""Test pagination with ascending order."""
|
||||
|
|
@ -138,8 +136,6 @@ async def test_responses_store_pagination_ascending():
|
|||
assert result2.data[0].id == "charlie-resp"
|
||||
assert result2.has_more is True
|
||||
|
||||
await store.sql_store.close()
|
||||
|
||||
|
||||
async def test_responses_store_pagination_with_model_filter():
|
||||
"""Test pagination combined with model filtering."""
|
||||
|
|
@ -181,8 +177,6 @@ async def test_responses_store_pagination_with_model_filter():
|
|||
assert result2.data[0].model == "model-a"
|
||||
assert result2.has_more is False
|
||||
|
||||
await store.sql_store.close()
|
||||
|
||||
|
||||
async def test_responses_store_pagination_invalid_after():
|
||||
"""Test error handling for invalid 'after' parameter."""
|
||||
|
|
@ -195,8 +189,6 @@ async def test_responses_store_pagination_invalid_after():
|
|||
with pytest.raises(ValueError, match="Record with id.*'non-existent' not found in table 'openai_responses'"):
|
||||
await store.list_responses(after="non-existent", limit=2)
|
||||
|
||||
await store.sql_store.close()
|
||||
|
||||
|
||||
async def test_responses_store_pagination_no_limit():
|
||||
"""Test pagination behavior when no limit is specified."""
|
||||
|
|
@ -229,8 +221,6 @@ async def test_responses_store_pagination_no_limit():
|
|||
assert result.data[1].id == "omega-resp"
|
||||
assert result.has_more is False
|
||||
|
||||
await store.sql_store.close()
|
||||
|
||||
|
||||
async def test_responses_store_get_response_object():
|
||||
"""Test retrieving a single response object."""
|
||||
|
|
@ -259,8 +249,6 @@ async def test_responses_store_get_response_object():
|
|||
with pytest.raises(ValueError, match="Response with id non-existent not found"):
|
||||
await store.get_response_object("non-existent")
|
||||
|
||||
await store.sql_store.close()
|
||||
|
||||
|
||||
async def test_responses_store_input_items_pagination():
|
||||
"""Test pagination functionality for input items."""
|
||||
|
|
@ -342,8 +330,6 @@ async def test_responses_store_input_items_pagination():
|
|||
with pytest.raises(ValueError, match="Cannot specify both 'before' and 'after' parameters"):
|
||||
await store.list_response_input_items("test-resp", before="some-id", after="other-id")
|
||||
|
||||
await store.sql_store.close()
|
||||
|
||||
|
||||
async def test_responses_store_input_items_before_pagination():
|
||||
"""Test before pagination functionality for input items."""
|
||||
|
|
@ -404,5 +390,3 @@ async def test_responses_store_input_items_before_pagination():
|
|||
ValueError, match="Input item with id 'non-existent' not found for response 'test-resp-before'"
|
||||
):
|
||||
await store.list_response_input_items("test-resp-before", before="non-existent")
|
||||
|
||||
await store.sql_store.close()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue