Skip to content

Commit

Permalink
minor enhancement for test fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwinb committed Nov 19, 2024
1 parent fcc2132 commit ea52a3e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion llama_stack/providers/tests/agents/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,6 @@ async def agents_stack(request, inference_model, safety_shield):
)
for model in inference_models
],
shields=[safety_shield],
shields=[safety_shield] if safety_shield else [],
)
return test_stack
3 changes: 3 additions & 0 deletions llama_stack/providers/tests/safety/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ def safety_shield(request):
else:
params = {}

if not shield_id:
return None

return ShieldInput(
shield_id=shield_id,
params=params,
Expand Down

0 comments on commit ea52a3e

Please sign in to comment.