🥔 add strapped IPA file and test for parse_ipa
This commit is contained in:
parent
c288317530
commit
995118bcd2
|
@ -563,7 +563,6 @@ def parse_ipa(ipa_path, file_size, sha256):
|
|||
# https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleshortversionstring
|
||||
ipa["versionCode"] = version_string_to_int(plist["CFBundleShortVersionString"])
|
||||
ipa["versionName"] = plist["CFBundleShortVersionString"]
|
||||
ipa["usage"] = {k: v for k, v in plist.items() if 'Usage' in k}
|
||||
return ipa
|
||||
|
||||
|
||||
|
|
Binary file not shown.
|
@ -1922,6 +1922,19 @@ class UpdateTest(unittest.TestCase):
|
|||
index['repo'][CATEGORIES_CONFIG_NAME],
|
||||
)
|
||||
|
||||
def test_parse_ipa(self):
|
||||
result = fdroidserver.update.parse_ipa('./com.fake.IpaApp_1000000000001.ipa', 'fake_size', 'fake_sha')
|
||||
self.maxDiff = None
|
||||
self.assertDictEqual(result, {
|
||||
'apkName': 'com.fake.IpaApp_1000000000001.ipa',
|
||||
'hash': 'fake_sha',
|
||||
'hashType': 'sha256',
|
||||
'packageName': 'org.onionshare.OnionShare',
|
||||
'size': 'fake_size',
|
||||
'versionCode': 1000000000001,
|
||||
'versionName': '1.0.1',
|
||||
})
|
||||
|
||||
|
||||
class TestUpdateVersionStringToInt(unittest.TestCase):
|
||||
|
||||
|
|
Loading…
Reference in New Issue