make versionCode/build.timeout an integer

Co-authored-by: Jochen Sprickerhof <git@jochen.sprickerhof.de>
This commit is contained in:
linsui 2022-09-14 09:45:24 +08:00 committed by Jochen Sprickerhof
parent 6f73a87eb1
commit 5a28f20301
20 changed files with 308 additions and 295 deletions

View file

@ -71,42 +71,42 @@ class BuildTest(unittest.TestCase):
(
'repo/obb.main.twoversions_1101613.apk',
'obb.main.twoversions',
'1101613',
1101613,
'0.1',
None,
),
(
'org.bitbucket.tickytacky.mirrormirror_1.apk',
'org.bitbucket.tickytacky.mirrormirror',
'1',
1,
'1.0',
None,
),
(
'org.bitbucket.tickytacky.mirrormirror_2.apk',
'org.bitbucket.tickytacky.mirrormirror',
'2',
2,
'1.0.1',
None,
),
(
'org.bitbucket.tickytacky.mirrormirror_3.apk',
'org.bitbucket.tickytacky.mirrormirror',
'3',
3,
'1.0.2',
None,
),
(
'org.bitbucket.tickytacky.mirrormirror_4.apk',
'org.bitbucket.tickytacky.mirrormirror',
'4',
4,
'1.0.3',
None,
),
(
'org.dyndns.fules.ck_20.apk',
'org.dyndns.fules.ck',
'20',
20,
'v1.6pre2',
[
'arm64-v8a',
@ -118,81 +118,81 @@ class BuildTest(unittest.TestCase):
'x86_64',
],
),
('urzip.apk', 'info.guardianproject.urzip', '100', '0.1', None),
('urzip-badcert.apk', 'info.guardianproject.urzip', '100', '0.1', None),
('urzip-badsig.apk', 'info.guardianproject.urzip', '100', '0.1', None),
('urzip-release.apk', 'info.guardianproject.urzip', '100', '0.1', None),
('urzip.apk', 'info.guardianproject.urzip', 100, '0.1', None),
('urzip-badcert.apk', 'info.guardianproject.urzip', 100, '0.1', None),
('urzip-badsig.apk', 'info.guardianproject.urzip', 100, '0.1', None),
('urzip-release.apk', 'info.guardianproject.urzip', 100, '0.1', None),
(
'urzip-release-unsigned.apk',
'info.guardianproject.urzip',
'100',
100,
'0.1',
None,
),
('repo/com.politedroid_3.apk', 'com.politedroid', '3', '1.2', None),
('repo/com.politedroid_4.apk', 'com.politedroid', '4', '1.3', None),
('repo/com.politedroid_5.apk', 'com.politedroid', '5', '1.4', None),
('repo/com.politedroid_6.apk', 'com.politedroid', '6', '1.5', None),
('repo/com.politedroid_3.apk', 'com.politedroid', 3, '1.2', None),
('repo/com.politedroid_4.apk', 'com.politedroid', 4, '1.3', None),
('repo/com.politedroid_5.apk', 'com.politedroid', 5, '1.4', None),
('repo/com.politedroid_6.apk', 'com.politedroid', 6, '1.5', None),
(
'repo/duplicate.permisssions_9999999.apk',
'duplicate.permisssions',
'9999999',
9999999,
'',
None,
),
(
'repo/info.zwanenburg.caffeinetile_4.apk',
'info.zwanenburg.caffeinetile',
'4',
4,
'1.3',
None,
),
(
'repo/obb.main.oldversion_1444412523.apk',
'obb.main.oldversion',
'1444412523',
1444412523,
'0.1',
None,
),
(
'repo/obb.mainpatch.current_1619_another-release-key.apk',
'obb.mainpatch.current',
'1619',
1619,
'0.1',
None,
),
(
'repo/obb.mainpatch.current_1619.apk',
'obb.mainpatch.current',
'1619',
1619,
'0.1',
None,
),
(
'repo/obb.main.twoversions_1101613.apk',
'obb.main.twoversions',
'1101613',
1101613,
'0.1',
None,
),
(
'repo/obb.main.twoversions_1101615.apk',
'obb.main.twoversions',
'1101615',
1101615,
'0.1',
None,
),
(
'repo/obb.main.twoversions_1101617.apk',
'obb.main.twoversions',
'1101617',
1101617,
'0.1',
None,
),
(
'repo/urzip-; Рахма́, [rɐxˈmanʲɪnəf] سيرجي_رخمانينوف 谢·.apk',
'info.guardianproject.urzip',
'100',
100,
'0.1',
None,
),
@ -228,7 +228,7 @@ class BuildTest(unittest.TestCase):
build = fdroidserver.metadata.Build()
build.commit = '1.0'
build.output = app.id + '.apk'
build.versionCode = '1'
build.versionCode = 1
build.versionName = '1.0'
build.ndk = 'r21e' # aka 21.4.7075529
vcs = mock.Mock()
@ -326,7 +326,7 @@ class BuildTest(unittest.TestCase):
build.output = app.id + '.apk'
build.scandelete = ['baz.so']
build.scanignore = ['foo.aar']
build.versionCode = '1'
build.versionCode = 1
build.versionName = '1.0'
vcs = mock.Mock()

View file

@ -179,7 +179,7 @@ class CheckupdatesTest(unittest.TestCase):
with mock.patch('urllib.request.urlopen', lambda a, b, c: respmock):
vername, vercode = fdroidserver.checkupdates.check_http(app)
self.assertEqual(vername, '1.1.9')
self.assertEqual(vercode, '10109')
self.assertEqual(vercode, 10109)
def test_check_http_blocks_unknown_schemes(self):
app = fdroidserver.metadata.App()
@ -230,7 +230,7 @@ class CheckupdatesTest(unittest.TestCase):
mock_path.is_file.return_falue = True
vername, vercode, _tag = fdroidserver.checkupdates.check_tags(app, None)
self.assertEqual(vername, '1.1.9')
self.assertEqual(vercode, '10109')
self.assertEqual(vercode, 10109)
app.UpdateCheckData = r'b.txt|c(.*)|.|v(.*)'
with mock.patch(
@ -242,7 +242,7 @@ class CheckupdatesTest(unittest.TestCase):
mock_path.is_file.return_falue = True
vername, vercode, _tag = fdroidserver.checkupdates.check_tags(app, None)
self.assertEqual(vername, '1.1.0')
self.assertEqual(vercode, '10109')
self.assertEqual(vercode, 10109)
app.UpdateCheckData = r'b.txt|c(.*)||'
with mock.patch(
@ -254,7 +254,7 @@ class CheckupdatesTest(unittest.TestCase):
mock_path.is_file.return_falue = True
vername, vercode, _tag = fdroidserver.checkupdates.check_tags(app, None)
self.assertEqual(vername, '1.1.9')
self.assertEqual(vercode, '10109')
self.assertEqual(vercode, 10109)
vcs.latesttags.return_value = ['Android-1.1.0', '1.1.8']
app.UpdateCheckData = r'b.txt|c(.*)||Android-([\d.]+)'
@ -267,21 +267,21 @@ class CheckupdatesTest(unittest.TestCase):
mock_path.is_file.return_falue = True
vername, vercode, _tag = fdroidserver.checkupdates.check_tags(app, None)
self.assertEqual(vername, '1.1.0')
self.assertEqual(vercode, '10109')
self.assertEqual(vercode, 10109)
app.UpdateCheckData = r'|\+(\d+)||Android-([\d.]+)'
vcs.latesttags.return_value = ['Android-1.1.0+1']
with mock.patch('fdroidserver.common.getvcs', return_value=vcs):
vername, vercode, _tag = fdroidserver.checkupdates.check_tags(app, None)
self.assertEqual(vername, '1.1.0')
self.assertEqual(vercode, '1')
self.assertEqual(vercode, 1)
app.UpdateCheckData = '|||'
vcs.latesttags.return_value = ['2']
with mock.patch('fdroidserver.common.getvcs', return_value=vcs):
vername, vercode, _tag = fdroidserver.checkupdates.check_tags(app, None)
self.assertEqual(vername, '2')
self.assertEqual(vercode, '2')
self.assertEqual(vercode, 2)
if __name__ == "__main__":

View file

@ -939,30 +939,30 @@ class CommonTest(unittest.TestCase):
pass # aapt is not required if androguard is present
testcases = [
('repo/obb.main.twoversions_1101613.apk', 'obb.main.twoversions', '1101613', '0.1'),
('org.bitbucket.tickytacky.mirrormirror_1.apk', 'org.bitbucket.tickytacky.mirrormirror', '1', '1.0'),
('org.bitbucket.tickytacky.mirrormirror_2.apk', 'org.bitbucket.tickytacky.mirrormirror', '2', '1.0.1'),
('org.bitbucket.tickytacky.mirrormirror_3.apk', 'org.bitbucket.tickytacky.mirrormirror', '3', '1.0.2'),
('org.bitbucket.tickytacky.mirrormirror_4.apk', 'org.bitbucket.tickytacky.mirrormirror', '4', '1.0.3'),
('org.dyndns.fules.ck_20.apk', 'org.dyndns.fules.ck', '20', 'v1.6pre2'),
('urzip.apk', 'info.guardianproject.urzip', '100', '0.1'),
('urzip-badcert.apk', 'info.guardianproject.urzip', '100', '0.1'),
('urzip-badsig.apk', 'info.guardianproject.urzip', '100', '0.1'),
('urzip-release.apk', 'info.guardianproject.urzip', '100', '0.1'),
('urzip-release-unsigned.apk', 'info.guardianproject.urzip', '100', '0.1'),
('repo/com.politedroid_3.apk', 'com.politedroid', '3', '1.2'),
('repo/com.politedroid_4.apk', 'com.politedroid', '4', '1.3'),
('repo/com.politedroid_5.apk', 'com.politedroid', '5', '1.4'),
('repo/com.politedroid_6.apk', 'com.politedroid', '6', '1.5'),
('repo/duplicate.permisssions_9999999.apk', 'duplicate.permisssions', '9999999', ''),
('repo/info.zwanenburg.caffeinetile_4.apk', 'info.zwanenburg.caffeinetile', '4', '1.3'),
('repo/obb.main.oldversion_1444412523.apk', 'obb.main.oldversion', '1444412523', '0.1'),
('repo/obb.mainpatch.current_1619_another-release-key.apk', 'obb.mainpatch.current', '1619', '0.1'),
('repo/obb.mainpatch.current_1619.apk', 'obb.mainpatch.current', '1619', '0.1'),
('repo/obb.main.twoversions_1101613.apk', 'obb.main.twoversions', '1101613', '0.1'),
('repo/obb.main.twoversions_1101615.apk', 'obb.main.twoversions', '1101615', '0.1'),
('repo/obb.main.twoversions_1101617.apk', 'obb.main.twoversions', '1101617', '0.1'),
('repo/urzip-; Рахма́, [rɐxˈmanʲɪnəf] سيرجي_رخمانينوف 谢·.apk', 'info.guardianproject.urzip', '100', '0.1'),
('repo/obb.main.twoversions_1101613.apk', 'obb.main.twoversions', 1101613, '0.1'),
('org.bitbucket.tickytacky.mirrormirror_1.apk', 'org.bitbucket.tickytacky.mirrormirror', 1, '1.0'),
('org.bitbucket.tickytacky.mirrormirror_2.apk', 'org.bitbucket.tickytacky.mirrormirror', 2, '1.0.1'),
('org.bitbucket.tickytacky.mirrormirror_3.apk', 'org.bitbucket.tickytacky.mirrormirror', 3, '1.0.2'),
('org.bitbucket.tickytacky.mirrormirror_4.apk', 'org.bitbucket.tickytacky.mirrormirror', 4, '1.0.3'),
('org.dyndns.fules.ck_20.apk', 'org.dyndns.fules.ck', 20, 'v1.6pre2'),
('urzip.apk', 'info.guardianproject.urzip', 100, '0.1'),
('urzip-badcert.apk', 'info.guardianproject.urzip', 100, '0.1'),
('urzip-badsig.apk', 'info.guardianproject.urzip', 100, '0.1'),
('urzip-release.apk', 'info.guardianproject.urzip', 100, '0.1'),
('urzip-release-unsigned.apk', 'info.guardianproject.urzip', 100, '0.1'),
('repo/com.politedroid_3.apk', 'com.politedroid', 3, '1.2'),
('repo/com.politedroid_4.apk', 'com.politedroid', 4, '1.3'),
('repo/com.politedroid_5.apk', 'com.politedroid', 5, '1.4'),
('repo/com.politedroid_6.apk', 'com.politedroid', 6, '1.5'),
('repo/duplicate.permisssions_9999999.apk', 'duplicate.permisssions', 9999999, ''),
('repo/info.zwanenburg.caffeinetile_4.apk', 'info.zwanenburg.caffeinetile', 4, '1.3'),
('repo/obb.main.oldversion_1444412523.apk', 'obb.main.oldversion', 1444412523, '0.1'),
('repo/obb.mainpatch.current_1619_another-release-key.apk', 'obb.mainpatch.current', 1619, '0.1'),
('repo/obb.mainpatch.current_1619.apk', 'obb.mainpatch.current', 1619, '0.1'),
('repo/obb.main.twoversions_1101613.apk', 'obb.main.twoversions', 1101613, '0.1'),
('repo/obb.main.twoversions_1101615.apk', 'obb.main.twoversions', 1101615, '0.1'),
('repo/obb.main.twoversions_1101617.apk', 'obb.main.twoversions', 1101617, '0.1'),
('repo/urzip-; Рахма́, [rɐxˈmanʲɪnəf] سيرجي_رخمانينوف 谢·.apk', 'info.guardianproject.urzip', 100, '0.1'),
]
for apkfilename, appid, versionCode, versionName in testcases:
a, vc, vn = fdroidserver.common.get_apk_id(apkfilename)
@ -992,7 +992,7 @@ class CommonTest(unittest.TestCase):
def test_get_apk_id_api_call(self):
self.assertEqual(
('info.guardianproject.urzip', '100', '0.1'),
('info.guardianproject.urzip', 100, '0.1'),
fdroidserver.common.get_apk_id('urzip.apk'),
)
@ -1089,12 +1089,12 @@ class CommonTest(unittest.TestCase):
def test_apk_release_name(self):
appid, vercode, sigfp = fdroidserver.common.apk_parse_release_filename('com.serwylo.lexica_905.apk')
self.assertEqual(appid, 'com.serwylo.lexica')
self.assertEqual(vercode, '905')
self.assertEqual(vercode, 905)
self.assertEqual(sigfp, None)
appid, vercode, sigfp = fdroidserver.common.apk_parse_release_filename('com.serwylo.lexica_905_c82e0f6.apk')
self.assertEqual(appid, 'com.serwylo.lexica')
self.assertEqual(vercode, '905')
self.assertEqual(vercode, 905)
self.assertEqual(sigfp, 'c82e0f6')
appid, vercode, sigfp = fdroidserver.common.apk_parse_release_filename('beverly_hills-90210.apk')
@ -1121,7 +1121,7 @@ class CommonTest(unittest.TestCase):
]
for path in paths:
self.assertTrue(os.path.isfile(path))
self.assertEqual(('0.94-test', '940', 'org.fdroid.fdroid'),
self.assertEqual(('0.94-test', 940, 'org.fdroid.fdroid'),
fdroidserver.common.parse_androidmanifests(paths, app))
app = fdroidserver.metadata.App()
@ -1145,7 +1145,7 @@ class CommonTest(unittest.TestCase):
]
for path in paths:
self.assertTrue(os.path.isfile(path))
self.assertEqual(('0.6.9', '23', 'cn.wildfirechat.chat'),
self.assertEqual(('0.6.9', 23, 'cn.wildfirechat.chat'),
fdroidserver.common.parse_androidmanifests(paths, app))
app = fdroidserver.metadata.App()
@ -1166,7 +1166,7 @@ class CommonTest(unittest.TestCase):
]
for path in paths:
self.assertTrue(os.path.isfile(path))
self.assertEqual(('1.9.0', '170521', 'com.integreight.onesheeld'),
self.assertEqual(('1.9.0', 170521, 'com.integreight.onesheeld'),
fdroidserver.common.parse_androidmanifests(paths, app))
app = fdroidserver.metadata.App()
@ -1176,7 +1176,7 @@ class CommonTest(unittest.TestCase):
]
for path in paths:
self.assertTrue(os.path.isfile(path))
self.assertEqual(('0.3.10', '29', 'dev.patrickgold.florisboard'),
self.assertEqual(('0.3.10', 29, 'dev.patrickgold.florisboard'),
fdroidserver.common.parse_androidmanifests(paths, app))
app = fdroidserver.metadata.App()
@ -1187,7 +1187,7 @@ class CommonTest(unittest.TestCase):
]
for path in paths:
self.assertTrue(os.path.isfile(path))
self.assertEqual(('1.8.1', '1_08_01', None),
self.assertEqual(('1.8.1', 10801, None),
fdroidserver.common.parse_androidmanifests(paths, app))
def test_parse_androidmanifests_ignore(self):
@ -1215,7 +1215,7 @@ class CommonTest(unittest.TestCase):
]
for path in paths:
self.assertTrue(os.path.isfile(path))
self.assertEqual(('0.95-dev', '949', 'org.fdroid.fdroid.dev'),
self.assertEqual(('0.95-dev', 949, 'org.fdroid.fdroid.dev'),
fdroidserver.common.parse_androidmanifests(paths, app))
app = fdroidserver.metadata.App()
@ -1228,7 +1228,7 @@ class CommonTest(unittest.TestCase):
]
for path in paths:
self.assertTrue(os.path.isfile(path))
self.assertEqual(('1.23.1', '245', 'eu.siacs.conversations'),
self.assertEqual(('1.23.1', 245, 'eu.siacs.conversations'),
fdroidserver.common.parse_androidmanifests(paths, app))
app = fdroidserver.metadata.App()
@ -1241,7 +1241,7 @@ class CommonTest(unittest.TestCase):
]
for path in paths:
self.assertTrue(os.path.isfile(path))
self.assertEqual(('2.0.0', '20000099', 'com.nextcloud.client'),
self.assertEqual(('2.0.0', 20000099, 'com.nextcloud.client'),
fdroidserver.common.parse_androidmanifests(paths, app))
app = fdroidserver.metadata.App()
@ -1254,7 +1254,7 @@ class CommonTest(unittest.TestCase):
]
for path in paths:
self.assertTrue(os.path.isfile(path))
self.assertEqual(('20171223', '20171223', 'com.nextcloud.android.beta'),
self.assertEqual(('20171223', 20171223, 'com.nextcloud.android.beta'),
fdroidserver.common.parse_androidmanifests(paths, app))
app = fdroidserver.metadata.App()
@ -1267,7 +1267,7 @@ class CommonTest(unittest.TestCase):
]
for path in paths:
self.assertTrue(os.path.isfile(path))
self.assertEqual(('1.9.8.1-ose', '197', 'at.bitfire.davdroid'),
self.assertEqual(('1.9.8.1-ose', 197, 'at.bitfire.davdroid'),
fdroidserver.common.parse_androidmanifests(paths, app))
app = fdroidserver.metadata.App()
@ -1280,7 +1280,7 @@ class CommonTest(unittest.TestCase):
]
for path in paths:
self.assertTrue(os.path.isfile(path))
self.assertEqual(('1.0-libre', '1', 'com.kunzisoft.fdroidtest.applicationidsuffix.libre'),
self.assertEqual(('1.0-libre', 1, 'com.kunzisoft.fdroidtest.applicationidsuffix.libre'),
fdroidserver.common.parse_androidmanifests(paths, app))
app = fdroidserver.metadata.App()
@ -1293,7 +1293,7 @@ class CommonTest(unittest.TestCase):
]
for path in paths:
self.assertTrue(os.path.isfile(path))
self.assertEqual(('20180430-pro', '20180430', 'com.kunzisoft.fdroidtest.applicationidsuffix.pro'),
self.assertEqual(('20180430-pro', 20180430, 'com.kunzisoft.fdroidtest.applicationidsuffix.pro'),
fdroidserver.common.parse_androidmanifests(paths, app))
app = fdroidserver.metadata.App()
@ -1306,7 +1306,7 @@ class CommonTest(unittest.TestCase):
]
for path in paths:
self.assertTrue(os.path.isfile(path))
self.assertEqual(('1.0-free', '1', 'com.kunzisoft.fdroidtest.applicationidsuffix'),
self.assertEqual(('1.0-free', 1, 'com.kunzisoft.fdroidtest.applicationidsuffix'),
fdroidserver.common.parse_androidmanifests(paths, app))
app = fdroidserver.metadata.App()
@ -1319,7 +1319,7 @@ class CommonTest(unittest.TestCase):
]
for path in paths:
self.assertTrue(os.path.isfile(path))
self.assertEqual(('20180430-underscore', '2018_04_30', 'com.kunzisoft.fdroidtest.applicationidsuffix.underscore'),
self.assertEqual(('20180430-underscore', 20180430, 'com.kunzisoft.fdroidtest.applicationidsuffix.underscore'),
fdroidserver.common.parse_androidmanifests(paths, app))
app = fdroidserver.metadata.App()
@ -1332,7 +1332,7 @@ class CommonTest(unittest.TestCase):
]
for path in paths:
self.assertTrue(os.path.isfile(path))
self.assertEqual(('1.0', '1', 'com.kunzisoft.fdroidtest.applicationidsuffix.underscore_first'),
self.assertEqual(('1.0', 1, 'com.kunzisoft.fdroidtest.applicationidsuffix.underscore_first'),
fdroidserver.common.parse_androidmanifests(paths, app))
app = fdroidserver.metadata.App()
@ -1345,7 +1345,7 @@ class CommonTest(unittest.TestCase):
]
for path in paths:
self.assertTrue(os.path.isfile(path))
self.assertEqual(('2.5.2-fdroid', '73', 'com.github.jameshnsears.quoteunquote'),
self.assertEqual(('2.5.2-fdroid', 73, 'com.github.jameshnsears.quoteunquote'),
fdroidserver.common.parse_androidmanifests(paths, app))
app = fdroidserver.metadata.App()
@ -1358,7 +1358,7 @@ class CommonTest(unittest.TestCase):
]
for path in paths:
self.assertTrue(os.path.isfile(path))
self.assertEqual(('1.6.34-fdroid', '105', 'com.jens.automation2'),
self.assertEqual(('1.6.34-fdroid', 105, 'com.jens.automation2'),
fdroidserver.common.parse_androidmanifests(paths, app))
app = fdroidserver.metadata.App()
@ -1371,7 +1371,7 @@ class CommonTest(unittest.TestCase):
]
for path in paths:
self.assertTrue(os.path.isfile(path))
self.assertEqual(('2021-06-30', '34', 'de.varengold.activeTAN'),
self.assertEqual(('2021-06-30', 34, 'de.varengold.activeTAN'),
fdroidserver.common.parse_androidmanifests(paths, app))
def test_get_all_gradle_and_manifests(self):
@ -1598,7 +1598,7 @@ class CommonTest(unittest.TestCase):
side_effect=assert_subprocess_call):
with tempfile.TemporaryDirectory() as tmpdir, TmpCwd(tmpdir):
fdroidserver.common.deploy_build_log_with_rsync(
'com.example.app', '4711', mocklogcontent)
'com.example.app', 4711, mocklogcontent)
expected_log_path = os.path.join(tmpdir, 'repo', 'com.example.app_4711.log.gz')
self.assertTrue(os.path.isfile(expected_log_path))
@ -2115,7 +2115,7 @@ class CommonTest(unittest.TestCase):
fdroidserver.common.read_pkg_args(['org.fdroid.fdroid'], allow_vercodes),
)
self.assertNotEqual(
{'com.example': ['123456']},
{'com.example': [123456]},
fdroidserver.common.read_pkg_args(['com.example:123456'], allow_vercodes),
)
@ -2125,11 +2125,11 @@ class CommonTest(unittest.TestCase):
fdroidserver.common.read_pkg_args(['org.fdroid.fdroid'], allow_vercodes),
)
self.assertEqual(
{'com.example': ['123456']},
{'com.example': [123456]},
fdroidserver.common.read_pkg_args(['com.example:123456'], allow_vercodes),
)
self.assertEqual(
{'org.debian_kit': ['6']},
{'org.debian_kit': [6]},
fdroidserver.common.read_pkg_args(['org.debian_kit_6.apk'], allow_vercodes),
)
appid_versionCode_pairs = (
@ -2138,7 +2138,7 @@ class CommonTest(unittest.TestCase):
'com.example:67890',
)
self.assertEqual(
{'com.example': ['12345', '67890'], 'org.fdroid.fdroid': ['1']},
{'com.example': [12345, 67890], 'org.fdroid.fdroid': [1]},
fdroidserver.common.read_pkg_args(appid_versionCode_pairs, allow_vercodes)
)
appid_versionCode_pairs = (
@ -2146,7 +2146,7 @@ class CommonTest(unittest.TestCase):
'org.c_base.c_beam_29.apk',
)
self.assertEqual(
{'com.example': ['67890'], 'org.c_base.c_beam': ['29']},
{'com.example': [67890], 'org.c_base.c_beam': [29]},
fdroidserver.common.read_pkg_args(appid_versionCode_pairs, allow_vercodes),
)

View file

@ -69,7 +69,7 @@ class ImportTest(unittest.TestCase):
'cn.wildfirechat.chat',
'https://github.com/wildfirechat/android-chat',
'0.6.9',
'23',
23,
),
(
'com.anpmech.launcher',
@ -81,7 +81,7 @@ class ImportTest(unittest.TestCase):
'ut.ewh.audiometrytest',
'https://github.com/ReeceStevens/ut_ewh_audiometer_2014',
'1.65',
'14',
14,
),
)
for appid, url, vn, vc in data:

View file

@ -318,7 +318,7 @@ class IndexTest(unittest.TestCase):
}
app = fdroidserver.metadata.parse_metadata(metadatafile)
app['icon'] = 'info.zwanenburg.caffeinetile.4.xml'
app['CurrentVersionCode'] = '4'
app['CurrentVersionCode'] = 4
apps = {app.id: app}
apk = {
'hash': 'dbbdd7deadb038862f426b71efe4a64df8c3edf25d669e935f349510e16f65db',

View file

@ -44,7 +44,7 @@ Builds:
sudo: ''
target: android-10
timeout: null
versionCode: '3'
versionCode: 3
versionName: '1.2'
- androidupdate: []
antcommands: []
@ -78,7 +78,7 @@ Builds:
sudo: ''
target: android-15
timeout: null
versionCode: '4'
versionCode: 4
versionName: '1.3'
- androidupdate: []
antcommands: []
@ -112,7 +112,7 @@ Builds:
sudo: ''
target: android-10
timeout: null
versionCode: '5'
versionCode: 5
versionName: '1.4'
- androidupdate: []
antcommands: []
@ -147,13 +147,13 @@ Builds:
sudo: echo 'this is just a test'
target: null
timeout: null
versionCode: '6'
versionCode: 6
versionName: '1.5'
Categories:
- Time
Changelog: ''
CurrentVersion: '1.5'
CurrentVersionCode: '6'
CurrentVersionCode: 6
Description: Activates silent mode during calendar events.
Disabled: null
Donate: null

View file

@ -42,7 +42,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '13'
versionCode: 13
versionName: '1.12'
- androidupdate: []
antcommands: []
@ -78,7 +78,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '16'
versionCode: 16
versionName: '1.15'
- androidupdate: []
antcommands: []
@ -114,7 +114,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '19'
versionCode: 19
versionName: '1.18'
- androidupdate: []
antcommands: []
@ -150,7 +150,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '20'
versionCode: 20
versionName: '1.19'
- androidupdate: []
antcommands: []
@ -186,7 +186,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '21'
versionCode: 21
versionName: '1.20'
- androidupdate: []
antcommands: []
@ -222,7 +222,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '22'
versionCode: 22
versionName: '1.21'
- androidupdate: []
antcommands: []
@ -256,7 +256,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '24'
versionCode: 24
versionName: '1.23'
- androidupdate: []
antcommands: []
@ -291,7 +291,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '25'
versionCode: 25
versionName: '1.24'
- androidupdate: []
antcommands: []
@ -326,7 +326,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '26'
versionCode: 26
versionName: '1.25'
- androidupdate: []
antcommands: []
@ -361,7 +361,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '27'
versionCode: 27
versionName: '1.26'
- androidupdate: []
antcommands: []
@ -396,7 +396,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '28'
versionCode: 28
versionName: '1.27'
- androidupdate: []
antcommands: []
@ -431,7 +431,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '30'
versionCode: 30
versionName: '1.29'
- androidupdate: []
antcommands: []
@ -466,7 +466,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '33'
versionCode: 33
versionName: '1.32'
- androidupdate: []
antcommands: []
@ -500,7 +500,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '34'
versionCode: 34
versionName: '1.33'
- androidupdate: []
antcommands: []
@ -535,7 +535,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '35'
versionCode: 35
versionName: '1.34'
- androidupdate: []
antcommands: []
@ -570,7 +570,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '36'
versionCode: 36
versionName: '1.35'
- androidupdate: []
antcommands: []
@ -605,7 +605,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '37'
versionCode: 37
versionName: '1.36'
- androidupdate: []
antcommands: []
@ -640,7 +640,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '38'
versionCode: 38
versionName: '1.37'
- androidupdate:
- .
@ -687,7 +687,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '40'
versionCode: 40
versionName: '2.1'
- androidupdate:
- .
@ -734,7 +734,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '42'
versionCode: 42
versionName: '2.3'
- androidupdate: []
antcommands: []
@ -771,7 +771,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '45'
versionCode: 45
versionName: '2.6'
- androidupdate: []
antcommands: []
@ -808,7 +808,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '46'
versionCode: 46
versionName: '2.7'
- androidupdate: []
antcommands: []
@ -845,7 +845,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '47'
versionCode: 47
versionName: '2.8'
- androidupdate: []
antcommands: []
@ -882,7 +882,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '48'
versionCode: 48
versionName: 2.8.1
- androidupdate: []
antcommands: []
@ -919,7 +919,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '49'
versionCode: 49
versionName: '2.9'
- androidupdate: []
antcommands: []
@ -956,7 +956,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '50'
versionCode: 50
versionName: 2.9.1
- androidupdate: []
antcommands: []
@ -993,7 +993,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '51'
versionCode: 51
versionName: 2.9.2
- androidupdate: []
antcommands: []
@ -1030,14 +1030,14 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '52'
versionCode: 52
versionName: '3.0'
Categories:
- System
- Security
Changelog: ''
CurrentVersion: '3.0'
CurrentVersionCode: '52'
CurrentVersionCode: 52
Description: 'An ad blocker that uses the hosts file. The hosts file
contains a list of mappings between hostnames and IP addresses. When

View file

@ -53,7 +53,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '5'
versionCode: 5
versionName: 0.3.3
- androidupdate: []
antcommands: []
@ -91,7 +91,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '6'
versionCode: 6
versionName: 0.3.3
- androidupdate: []
antcommands: []
@ -128,7 +128,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '9'
versionCode: 9
versionName: 0.4.2
- androidupdate: []
antcommands: []
@ -165,7 +165,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '11'
versionCode: 11
versionName: 0.5.1
- androidupdate: []
antcommands: []
@ -201,7 +201,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '12'
versionCode: 12
versionName: 0.5.2
- androidupdate: []
antcommands: []
@ -237,7 +237,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '100'
versionCode: 100
versionName: 0.5.3
- androidupdate: []
antcommands: []
@ -273,7 +273,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '101'
versionCode: 101
versionName: 0.5.4
- androidupdate: []
antcommands: []
@ -309,13 +309,13 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '102'
versionCode: 102
versionName: 0.6.0
Categories:
- Phone & SMS
Changelog: ''
CurrentVersion: 0.6.0
CurrentVersionCode: '102'
CurrentVersionCode: 102
Description: 'SMSSecure is an SMS/MMS application that allows you to protect your
privacy while communicating with friends.

View file

@ -44,7 +44,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '110'
versionCode: 110
versionName: 0.0.11-ARMv7
- androidupdate:
- .
@ -81,7 +81,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '111'
versionCode: 111
versionName: 0.0.11-ARM
- androidupdate:
- .
@ -118,7 +118,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '112'
versionCode: 112
versionName: 0.0.11-x86
- androidupdate:
- .
@ -155,7 +155,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '113'
versionCode: 113
versionName: 0.0.11-mips
- androidupdate: []
antcommands: []
@ -191,7 +191,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '1301'
versionCode: 1301
versionName: 0.1.3-MIPS
- androidupdate: []
antcommands: []
@ -227,7 +227,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '1302'
versionCode: 1302
versionName: 0.1.3-x86
- androidupdate: []
antcommands: []
@ -263,7 +263,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '1303'
versionCode: 1303
versionName: 0.1.3-ARM
- androidupdate: []
antcommands: []
@ -299,7 +299,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '1304'
versionCode: 1304
versionName: 0.1.3-ARMv7
- androidupdate: []
antcommands: []
@ -334,7 +334,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '9002'
versionCode: 9002
versionName: 0.9.0
- androidupdate: []
antcommands: []
@ -369,7 +369,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '9004'
versionCode: 9004
versionName: 0.9.0
- androidupdate: []
antcommands: []
@ -404,7 +404,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '9102'
versionCode: 9102
versionName: 0.9.1
- androidupdate: []
antcommands: []
@ -439,7 +439,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '9104'
versionCode: 9104
versionName: 0.9.1
- androidupdate: []
antcommands: []
@ -474,7 +474,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '9502'
versionCode: 9502
versionName: 0.9.5
- androidupdate: []
antcommands: []
@ -509,7 +509,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '9504'
versionCode: 9504
versionName: 0.9.5
- androidupdate: []
antcommands: []
@ -544,7 +544,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '9602'
versionCode: 9602
versionName: 0.9.6
- androidupdate: []
antcommands: []
@ -579,7 +579,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '9604'
versionCode: 9604
versionName: 0.9.6
- androidupdate: []
antcommands: []
@ -614,7 +614,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '9702'
versionCode: 9702
versionName: 0.9.7
- androidupdate: []
antcommands: []
@ -649,7 +649,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '9704'
versionCode: 9704
versionName: 0.9.7
- androidupdate: []
antcommands: []
@ -684,7 +684,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '9711'
versionCode: 9711
versionName: 0.9.7.1
- androidupdate: []
antcommands: []
@ -719,7 +719,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '9712'
versionCode: 9712
versionName: 0.9.7.1
- androidupdate: []
antcommands: []
@ -754,7 +754,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '9714'
versionCode: 9714
versionName: 0.9.7.1
- androidupdate: []
antcommands: []
@ -789,7 +789,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '9802'
versionCode: 9802
versionName: 0.9.8
- androidupdate: []
antcommands: []
@ -824,7 +824,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '9803'
versionCode: 9803
versionName: 0.9.8
- androidupdate: []
antcommands: []
@ -859,7 +859,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '9804'
versionCode: 9804
versionName: 0.9.8
- androidupdate: []
antcommands: []
@ -894,7 +894,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '9902'
versionCode: 9902
versionName: 0.9.9
- androidupdate: []
antcommands: []
@ -929,7 +929,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '9903'
versionCode: 9903
versionName: 0.9.9
- androidupdate: []
antcommands: []
@ -964,7 +964,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '9904'
versionCode: 9904
versionName: 0.9.9
- androidupdate: []
antcommands: []
@ -999,7 +999,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '10002'
versionCode: 10002
versionName: 0.9.10
- androidupdate: []
antcommands: []
@ -1034,7 +1034,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '10003'
versionCode: 10003
versionName: 0.9.10
- androidupdate: []
antcommands: []
@ -1069,7 +1069,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '10004'
versionCode: 10004
versionName: 0.9.10
- androidupdate: []
antcommands: []
@ -1104,7 +1104,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '10006'
versionCode: 10006
versionName: 1.0.0
- androidupdate: []
antcommands: []
@ -1139,7 +1139,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '10007'
versionCode: 10007
versionName: 1.0.0
- androidupdate: []
antcommands: []
@ -1174,7 +1174,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '10008'
versionCode: 10008
versionName: 1.0.0
- androidupdate: []
antcommands: []
@ -1209,7 +1209,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '10102'
versionCode: 10102
versionName: 1.0.1
- androidupdate: []
antcommands: []
@ -1244,7 +1244,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '10103'
versionCode: 10103
versionName: 1.0.1
- androidupdate: []
antcommands: []
@ -1279,7 +1279,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '10104'
versionCode: 10104
versionName: 1.0.1
- androidupdate: []
antcommands: []
@ -1316,7 +1316,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '1010303'
versionCode: 1010303
versionName: 1.1.3
- androidupdate: []
antcommands: []
@ -1353,7 +1353,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '1010304'
versionCode: 1010304
versionName: 1.1.3
- androidupdate: []
antcommands: []
@ -1390,7 +1390,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '1010305'
versionCode: 1010305
versionName: 1.1.3
- androidupdate: []
antcommands: []
@ -1427,7 +1427,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '1010503'
versionCode: 1010503
versionName: 1.1.5
- androidupdate: []
antcommands: []
@ -1464,7 +1464,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '1010504'
versionCode: 1010504
versionName: 1.1.5
- androidupdate: []
antcommands: []
@ -1501,7 +1501,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '1010505'
versionCode: 1010505
versionName: 1.1.5
- androidupdate: []
antcommands: []
@ -1538,7 +1538,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '1010603'
versionCode: 1010603
versionName: 1.1.6
- androidupdate: []
antcommands: []
@ -1575,7 +1575,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '1010604'
versionCode: 1010604
versionName: 1.1.6
- androidupdate: []
antcommands: []
@ -1612,7 +1612,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '1010605'
versionCode: 1010605
versionName: 1.1.6
- androidupdate: []
antcommands: []
@ -1649,7 +1649,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '1020003'
versionCode: 1020003
versionName: 1.2.0
- androidupdate: []
antcommands: []
@ -1686,7 +1686,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '1020004'
versionCode: 1020004
versionName: 1.2.0
- androidupdate: []
antcommands: []
@ -1723,7 +1723,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '1020005'
versionCode: 1020005
versionName: 1.2.0
- androidupdate: []
antcommands: []
@ -1760,7 +1760,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '1020103'
versionCode: 1020103
versionName: 1.2.1
- androidupdate: []
antcommands: []
@ -1797,7 +1797,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '1020104'
versionCode: 1020104
versionName: 1.2.1
- androidupdate: []
antcommands: []
@ -1834,7 +1834,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '1020105'
versionCode: 1020105
versionName: 1.2.1
- androidupdate: []
antcommands: []
@ -1871,7 +1871,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '1020203'
versionCode: 1020203
versionName: 1.2.2
- androidupdate: []
antcommands: []
@ -1908,7 +1908,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '1020204'
versionCode: 1020204
versionName: 1.2.2
- androidupdate: []
antcommands: []
@ -1945,7 +1945,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '1020205'
versionCode: 1020205
versionName: 1.2.2
- androidupdate: []
antcommands: []
@ -1982,7 +1982,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '1020303'
versionCode: 1020303
versionName: 1.2.3
- androidupdate: []
antcommands: []
@ -2019,7 +2019,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '1020304'
versionCode: 1020304
versionName: 1.2.3
- androidupdate: []
antcommands: []
@ -2056,7 +2056,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '1020305'
versionCode: 1020305
versionName: 1.2.3
- androidupdate: []
antcommands: []
@ -2093,7 +2093,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '1020403'
versionCode: 1020403
versionName: 1.2.4
- androidupdate: []
antcommands: []
@ -2130,7 +2130,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '1020404'
versionCode: 1020404
versionName: 1.2.4
- androidupdate: []
antcommands: []
@ -2167,7 +2167,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '1020405'
versionCode: 1020405
versionName: 1.2.4
- androidupdate: []
antcommands: []
@ -2204,7 +2204,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '1020503'
versionCode: 1020503
versionName: 1.2.5
- androidupdate: []
antcommands: []
@ -2241,7 +2241,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '1020504'
versionCode: 1020504
versionName: 1.2.5
- androidupdate: []
antcommands: []
@ -2278,7 +2278,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '1020505'
versionCode: 1020505
versionName: 1.2.5
- androidupdate: []
antcommands: []
@ -2315,7 +2315,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '1030003'
versionCode: 1030003
versionName: 1.2.6
- androidupdate: []
antcommands: []
@ -2352,7 +2352,7 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '1030004'
versionCode: 1030004
versionName: 1.2.6
- androidupdate: []
antcommands: []
@ -2389,13 +2389,13 @@ Builds:
sudo: ''
target: null
timeout: null
versionCode: '1030005'
versionCode: 1030005
versionName: 1.2.6
Categories:
- Multimedia
Changelog: ''
CurrentVersion: 1.2.6
CurrentVersionCode: '1030005'
CurrentVersionCode: 1030005
Description: 'Video and audio player that supports a wide range of formats,
for both local and remote playback.

View file

@ -246,7 +246,7 @@ class ScannerTest(unittest.TestCase):
build.commit = '1.0'
build.output = app.id + '.apk'
build.scanignore = ['baz.so', 'foo.aar']
build.versionCode = '1'
build.versionCode = 1
build.versionName = '1.0'
vcs = mock.Mock()

View file

@ -1427,7 +1427,7 @@ class UpdateTest(unittest.TestCase):
'Builds': None,
'Changelog': '',
'CurrentVersion': '',
'CurrentVersionCode': '',
'CurrentVersionCode': None,
'Disabled': '',
'Donate': '',
'FlattrID': '',