From: Hans-Christoph Steiner Date: Mon, 16 Apr 2018 09:35:30 +0000 (+0200) Subject: add test of Android TV "activity banner" graphic X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=673a3517d337e9e9de736459c13b0126883b8fba;p=fdroidserver.git add test of Android TV "activity banner" graphic !491 https://developer.android.com/guide/topics/manifest/activity-element.html#banner https://developer.android.com/training/tv/start/start.html#banner --- diff --git a/tests/repo/duplicate.permisssions_9999999.apk b/tests/repo/duplicate.permisssions_9999999.apk index a7510f3a..ea440c5e 100644 Binary files a/tests/repo/duplicate.permisssions_9999999.apk and b/tests/repo/duplicate.permisssions_9999999.apk differ diff --git a/tests/update.TestCase b/tests/update.TestCase index 9c60adfd..eb59c3d0 100755 --- a/tests/update.TestCase +++ b/tests/update.TestCase @@ -292,11 +292,16 @@ class UpdateTest(unittest.TestCase): def test_scan_apk(self): config = dict() fdroidserver.common.fill_config_defaults(config) + fdroidserver.common.config = config fdroidserver.update.config = config os.chdir(os.path.join(localmodule, 'tests')) if os.path.basename(os.getcwd()) != 'tests': raise Exception('This test must be run in the "tests/" subdir') + apk_info = fdroidserver.update.scan_apk('repo/duplicate.permisssions_9999999.apk') + self.assertEqual(apk_info['icons_src'], {'160': 'res/drawable/ic_launcher.png', + '-1': 'res/drawable/ic_launcher.png'}) + apk_info = fdroidserver.update.scan_apk('org.dyndns.fules.ck_20.apk') self.assertEqual(apk_info['icons_src'], {'240': 'res/drawable-hdpi-v4/icon_launcher.png', '120': 'res/drawable-ldpi-v4/icon_launcher.png',