diff --git a/api/tests/common/test_serializers.py b/api/tests/common/test_serializers.py index 5bd739e44..39941a297 100644 --- a/api/tests/common/test_serializers.py +++ b/api/tests/common/test_serializers.py @@ -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)