chiark / gitweb /
add test of Android TV "activity banner" graphic
authorHans-Christoph Steiner <hans@eds.org>
Mon, 16 Apr 2018 09:35:30 +0000 (11:35 +0200)
committerHans-Christoph Steiner <hans@eds.org>
Mon, 16 Apr 2018 09:37:11 +0000 (11:37 +0200)
!491

https://developer.android.com/guide/topics/manifest/activity-element.html#banner
https://developer.android.com/training/tv/start/start.html#banner

tests/repo/duplicate.permisssions_9999999.apk
tests/update.TestCase

index a7510f3a5efdb1ba22854588725817445569fad6..ea440c5e057d65126717d7cf23878a02a54e7515 100644 (file)
Binary files a/tests/repo/duplicate.permisssions_9999999.apk and b/tests/repo/duplicate.permisssions_9999999.apk differ
index 9c60adfdb1ef7a0106ee6f75194a47c0f6a979c7..eb59c3d0848d25994f18e48b2306789a510c567b 100755 (executable)
@@ -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',