install: download_fdroid_apk() to fetch the recommended initial APK

This commit is contained in:
Hans-Christoph Steiner 2024-02-27 17:07:57 +01:00
parent 56bed02a29
commit 49dcc53076
2 changed files with 19 additions and 0 deletions

View file

@ -7,6 +7,8 @@ import os
import sys
import unittest
from pathlib import Path
localmodule = os.path.realpath(
os.path.join(os.path.dirname(inspect.getfile(inspect.currentframe())), '..')
)
@ -33,6 +35,11 @@ class InstallTest(unittest.TestCase):
for device in devices:
self.assertIsInstance(device, str)
@unittest.skipUnless(os.getenv('test_download_fdroid_apk'), 'requires net access')
def test_download_fdroid_apk(self):
f = fdroidserver.install.download_fdroid_apk()
self.assertTrue(Path(f).exists())
if __name__ == "__main__":
os.chdir(os.path.dirname(__file__))