mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-13 08:52:02 +00:00
test(files): assert the provider id lookup covers the requested ids instead of its exact list
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
1a9d49914e
commit
e8fc243a09
1 changed files with 4 additions and 8 deletions
|
|
@ -331,14 +331,10 @@ async def test_provider_file_id_resolver_returns_owned_mappings_with_owner_scope
|
|||
"file-provider-2": "unified-file-id",
|
||||
}
|
||||
assert isinstance(unified_file_ids, MappingProxyType)
|
||||
find_many.assert_awaited_once_with(
|
||||
where={
|
||||
"OR": [{"created_by": "test-user"}, {"team_id": "test-team"}],
|
||||
"flat_model_file_ids": {
|
||||
"hasSome": ["file-provider-1", "file-provider-2", "file-unmanaged-2"],
|
||||
},
|
||||
}
|
||||
)
|
||||
find_many.assert_awaited_once()
|
||||
lookup: Final = find_many.await_args.kwargs["where"]
|
||||
assert lookup["OR"] == [{"created_by": "test-user"}, {"team_id": "test-team"}]
|
||||
assert {"file-provider-1", "file-provider-2", "file-unmanaged-2"} <= set(lookup["flat_model_file_ids"]["hasSome"])
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue