feat: compress apk to be under github file size limit

This commit is contained in:
Florian Bezannier
2024-08-31 14:10:19 +02:00
parent da034c8ec2
commit 442fbc505a
4 changed files with 17 additions and 11 deletions
+2 -3
View File
@@ -5,7 +5,6 @@ import unittest
from datetime import datetime, timedelta
from unittest.mock import MagicMock, patch
import pytz
import reverse_geocode
from dateutil.tz import tzutc
from greenery.lego import parse, charclass
@@ -337,10 +336,10 @@ class TestUnit(unittest.TestCase):
except FileNotFoundError:
pass
assert get_content_from_apk(filename, "FR")
assert github_file_need_to_be_downloaded(GITHUB_USER, GITHUB_REPO, "", filename) is False
assert github_file_need_to_be_downloaded(GITHUB_USER, GITHUB_REPO, "", filename + ".bz2") is False
def test_file_need_to_be_updated(self):
filename = "mypeugeot.apk"
filename = "mypeugeot.apk.bz2"
with open(filename, "w") as f:
f.write(" ")
assert github_file_need_to_be_downloaded(GITHUB_USER, GITHUB_REPO, "", filename) is True