Fix Failing file_size Tests (#3906)

This commit is contained in:
Bibo-Joshi 2023-10-01 11:30:56 +02:00 committed by GitHub
parent 1ef242a17e
commit eaf802e07d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -99,7 +99,9 @@ class TestPhotoWithoutRequest(TestPhotoBase):
assert photo.file_size in self.file_size assert photo.file_size in self.file_size
assert thumb.width == 90 assert thumb.width == 90
assert thumb.height == 90 assert thumb.height == 90
assert thumb.file_size == 1477 # File sizes don't seem to be consistent, so we use the values that we have observed
# so far
assert thumb.file_size in [1475, 1477]
def test_de_json(self, bot, photo): def test_de_json(self, bot, photo):
json_dict = { json_dict = {

View file

@ -103,7 +103,7 @@ class TestStickerBase:
file_size = 39518 file_size = 39518
thumb_width = 319 thumb_width = 319
thumb_height = 320 thumb_height = 320
thumb_file_size = 21472 thumb_file_size = 21448
type = Sticker.REGULAR type = Sticker.REGULAR
custom_emoji_id = "ThisIsSuchACustomEmojiID" custom_emoji_id = "ThisIsSuchACustomEmojiID"
needs_repainting = True needs_repainting = True