Compare commits
No commits in common. "a40ce94d8c2dcd33544f91b945add9315a507c72" and "f9412857f5566001b9dea0700fc3052e86a544d8" have entirely different histories.
a40ce94d8c
...
f9412857f5
2 changed files with 1 additions and 7 deletions
|
|
@ -51,12 +51,6 @@ def test_get_users_public_info_bulk_fetches_and_caches(mock_get_client):
|
||||||
assert result[str(user_2)]["avatar"] is None
|
assert result[str(user_2)]["avatar"] is None
|
||||||
mock_httpx.request.assert_called_once()
|
mock_httpx.request.assert_called_once()
|
||||||
|
|
||||||
# The accounts service's actual filter param is `uuid_in` (single
|
|
||||||
# underscore) — `uuid__in` (Django-ORM style) gets rejected with a 400.
|
|
||||||
requested_url = mock_httpx.request.call_args.kwargs["url"]
|
|
||||||
assert "uuid_in=" in requested_url
|
|
||||||
assert "uuid__in=" not in requested_url
|
|
||||||
|
|
||||||
# Second call for the same UUIDs should be served entirely from cache.
|
# Second call for the same UUIDs should be served entirely from cache.
|
||||||
mock_get_client.reset_mock()
|
mock_get_client.reset_mock()
|
||||||
result_again = accounts_client.get_users_public_info_bulk([user_1, user_2])
|
result_again = accounts_client.get_users_public_info_bulk([user_1, user_2])
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ def get_users_public_info_bulk(uuids: list) -> dict[str, dict]:
|
||||||
uuid_in = ",".join(str(u) for u in uncached)
|
uuid_in = ",".join(str(u) for u in uncached)
|
||||||
response = client.get_httpx_client().request(
|
response = client.get_httpx_client().request(
|
||||||
method="get",
|
method="get",
|
||||||
url=f"/users/api/users/?uuid_in={uuid_in}",
|
url=f"/users/api/users/?uuid__in={uuid_in}",
|
||||||
)
|
)
|
||||||
if response.status_code == 200:
|
if response.status_code == 200:
|
||||||
for profile in response.json().get("results", []):
|
for profile in response.json().get("results", []):
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue