mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-04 22:40:29 +03:00
test for common.get_app_id_aapt
This commit is contained in:
parent
91369dacfb
commit
04daa7a03a
1 changed files with 17 additions and 0 deletions
|
|
@ -25,6 +25,7 @@ if localmodule not in sys.path:
|
|||
import fdroidserver.signindex
|
||||
import fdroidserver.common
|
||||
import fdroidserver.metadata
|
||||
from fdroidserver.exception import FDroidException
|
||||
|
||||
|
||||
class CommonTest(unittest.TestCase):
|
||||
|
|
@ -401,6 +402,22 @@ class CommonTest(unittest.TestCase):
|
|||
self.assertEqual(keytoolcertfingerprint,
|
||||
fdroidserver.common.apk_signer_fingerprint_short(apkfile))
|
||||
|
||||
def test_get_api_id_aapt(self):
|
||||
|
||||
config = dict()
|
||||
fdroidserver.common.fill_config_defaults(config)
|
||||
fdroidserver.common.config = config
|
||||
self._set_build_tools()
|
||||
config['aapt'] = fdroidserver.common.find_sdk_tools_cmd('aapt')
|
||||
|
||||
appid, vercode, vername = fdroidserver.common.get_apk_id_aapt('repo/obb.main.twoversions_1101613.apk')
|
||||
self.assertEqual('obb.main.twoversions', appid)
|
||||
self.assertEqual('1101613', vercode)
|
||||
self.assertEqual('0.1', vername)
|
||||
|
||||
with self.assertRaises(FDroidException):
|
||||
fdroidserver.common.get_apk_id_aapt('nope')
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = optparse.OptionParser()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue