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:
kerry 2026-11-13 01:12:54 +00:00
parent 1a9d49914e
commit e8fc243a09

View file

@ -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