mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 06:50:29 +03:00
parent
3e0d1beb09
commit
92c4f048de
1 changed files with 70 additions and 45 deletions
|
|
@ -338,6 +338,31 @@ class UpdateTest(unittest.TestCase):
|
|||
if os.path.basename(os.getcwd()) != 'tests':
|
||||
raise Exception('This test must be run in the "tests/" subdir')
|
||||
|
||||
try:
|
||||
config['aapt'] = fdroidserver.common.find_sdk_tools_cmd('aapt')
|
||||
except fdroidserver.exception.FDroidException:
|
||||
pass # aapt is not required if androguard is present
|
||||
|
||||
for use_androguard in (True, False):
|
||||
print('USE_ANDROGUARD', use_androguard)
|
||||
if use_androguard:
|
||||
try:
|
||||
import androguard
|
||||
androguard
|
||||
|
||||
def func():
|
||||
return True
|
||||
fdroidserver.common.use_androguard = func
|
||||
except ImportError:
|
||||
continue
|
||||
else:
|
||||
if 'aapt' in config:
|
||||
def func():
|
||||
return False
|
||||
fdroidserver.common.use_androguard = func
|
||||
else:
|
||||
continue
|
||||
|
||||
apk_info = fdroidserver.update.scan_apk('repo/souch.smsbypass_9.apk')
|
||||
self.assertIsNone(apk_info.get('maxSdkVersion'))
|
||||
self.assertEqual(apk_info.get('versionName'), '0.9')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue