Revert "fix(api/tests): order expected test_attachment_serializer_remote_file alphabetically"

This reverts commit b20bfe3ac2.
This commit is contained in:
jon r 2025-02-22 22:03:30 +01:00
parent 7bb3cc12e5
commit 647cf045cd
1 changed files with 8 additions and 8 deletions

View File

@ -216,25 +216,25 @@ def test_attachment_serializer_remote_file(factories, to_api_date):
attachment = factories["common.Attachment"](file=None)
proxy_url = reverse("api:v1:attachments-proxy", kwargs={"uuid": attachment.uuid})
expected = {
"creation_date": to_api_date(attachment.creation_date),
"mimetype": attachment.mimetype,
"uuid": str(attachment.uuid),
"size": attachment.size,
"mimetype": attachment.mimetype,
"creation_date": to_api_date(attachment.creation_date),
# everything is the same, except for the urls field because:
# - the file isn't available on the local pod
# - we need to return different URLs so that the client can trigger
# a fetch and get redirected to the desired version
#
"urls": {
"large_square_crop": federation_utils.full_url(
proxy_url + "?next=large_square_crop"
),
"source": attachment.url,
"original": federation_utils.full_url(proxy_url + "?next=original"),
"medium_square_crop": federation_utils.full_url(
proxy_url + "?next=medium_square_crop"
),
"original": federation_utils.full_url(proxy_url + "?next=original"),
"source": attachment.url,
"large_square_crop": federation_utils.full_url(
proxy_url + "?next=large_square_crop"
),
},
"uuid": str(attachment.uuid),
}
serializer = serializers.AttachmentSerializer(attachment)