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