[bugfix] fix client-sdk tests for v1 (#777)

# What does this PR do?

- as title, as API have been updated

## Test Plan

```
LLAMA_STACK_BASE_URL="http://localhost:5000" pytest -v tests/client-sdk/
```

## Sources

Please link relevant resources if necessary.


## Before submitting

- [ ] This PR fixes a typo or improves the docs (you can dismiss the
other checks if that's the case).
- [ ] Ran pre-commit to handle lint / formatting issues.
- [ ] Read the [contributor
guideline](https://github.com/meta-llama/llama-stack/blob/main/CONTRIBUTING.md),
      Pull Request section?
- [ ] Updated relevant documentation.
- [ ] Wrote necessary unit or integration tests.
This commit is contained in:
Xi Yan 2025-01-15 16:06:57 -08:00 committed by GitHub
parent 8fd9bcb8cd
commit 965644ce68
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 19 additions and 18 deletions

View file

@ -30,7 +30,7 @@ def data_url_from_image(file_path):
@pytest.fixture(scope="session")
def available_shields(llama_stack_client):
return [shield.identifier for shield in llama_stack_client.shields.list()]
return [shield.identifier for shield in llama_stack_client.shields.list().data]
@pytest.fixture(scope="session")
@ -54,7 +54,7 @@ def code_scanner_shield_id(available_shields):
@pytest.fixture(scope="session")
def model_providers(llama_stack_client):
return set(
[x.provider_id for x in llama_stack_client.providers.list()["inference"]]
[x["provider_id"] for x in llama_stack_client.providers.list().inference]
)