Skip to content

Commit

Permalink
dont hardcode test
Browse files Browse the repository at this point in the history
  • Loading branch information
chrstinalin committed Sep 13, 2024
1 parent d1712eb commit 6df6c54
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/olympia/activity/tests/test_serializers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from rest_framework.test import APIRequestFactory
from django.template.defaultfilters import filesizeformat

from olympia import amo
from olympia.activity.models import ActivityLog, AttachmentLog
Expand Down Expand Up @@ -129,5 +130,5 @@ def test_attachment_size(self):
file=ContentFile('Pseudo File', name='attachment.txt')
)
result = self.serialize()
assert result['attachment_size'] == '11\xa0bytes'
assert result['attachment_size'] == filesizeformat(attachment.file.size)

0 comments on commit 6df6c54

Please sign in to comment.