mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-01 16:24:44 +00:00
add tests
This commit is contained in:
parent
89342d352c
commit
43af05d851
1 changed files with 19 additions and 0 deletions
|
@ -33,3 +33,22 @@ class TestModelRegistration:
|
||||||
await models_impl.register_model(
|
await models_impl.register_model(
|
||||||
model_id="Llama3-NonExistent-Model",
|
model_id="Llama3-NonExistent-Model",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@pytest.mark.asyncio
|
||||||
|
async def test_update_model(self, inference_stack):
|
||||||
|
_, models_impl = inference_stack
|
||||||
|
|
||||||
|
# Register a model to update
|
||||||
|
model_id = "Llama3.1-8B-Instruct"
|
||||||
|
await models_impl.register_model(model_id=model_id)
|
||||||
|
|
||||||
|
# Update the model
|
||||||
|
new_provider_id = "updated_provider"
|
||||||
|
await models_impl.update_model(model_id=model_id, provider_id=new_provider_id)
|
||||||
|
|
||||||
|
# Retrieve the updated model to verify changes
|
||||||
|
updated_model = await models_impl.get_model(model_id)
|
||||||
|
assert updated_model.provider_id == new_provider_id
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
await models_impl.delete_model(model_id=model_id)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue