mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-06 02:48:13 +00:00
test(guardrails): fix scope test lint issues
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
62e4fa28a7
commit
df7e7e13e1
2 changed files with 3 additions and 3 deletions
|
|
@ -530,7 +530,7 @@ def test_logging_only_monitor_counts_only_the_observed_direction(
|
|||
today: Final = datetime.now(timezone.utc).date().isoformat()
|
||||
for identity in (input_identity, output_identity):
|
||||
detail: Final = eventually(
|
||||
lambda: candidate.request(
|
||||
lambda identity=identity: candidate.request(
|
||||
"GET",
|
||||
f"/guardrails/usage/detail/{guardrail_ids[identity]}",
|
||||
params={"start_date": today, "end_date": today},
|
||||
|
|
@ -966,7 +966,7 @@ def test_X1_missing_null_and_both_scope_have_identical_scans(gateway: Gateway, t
|
|||
expected_directions: Final = _directions_for_audit_leg(("request", "response"), scope)
|
||||
eventually(
|
||||
lambda: edge.received.qsize(),
|
||||
lambda count: count == len(expected_directions),
|
||||
lambda count, expected_directions=expected_directions: count == len(expected_directions),
|
||||
seconds=20,
|
||||
)
|
||||
payloads: Final = tuple(JSON_OBJECT.validate_json(call.body) for call in edge.drain())
|
||||
|
|
|
|||
|
|
@ -1156,7 +1156,7 @@ class TestLoggingOnlyScopeValidation:
|
|||
callback_lists: Final = _all_callback_lists()
|
||||
callback_snapshots: Final = [list(callback_list) for callback_list in callback_lists]
|
||||
|
||||
with pytest.raises(ValueError):
|
||||
with pytest.raises(ValueError, match="logging_only_scope"):
|
||||
handler.initialize_guardrail(
|
||||
guardrail=_invalid_scope_content_filter_guardrail(),
|
||||
source="config",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue