mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-04 22:40:29 +03:00
Support multiple flavours in parse_androidmanifests
Previously only the last flavour was checked.
This commit is contained in:
parent
1ad0e7689a
commit
331b4830dd
4 changed files with 135 additions and 4 deletions
|
|
@ -1264,6 +1264,19 @@ class CommonTest(unittest.TestCase):
|
|||
self.assertEqual(('1.6.34-fdroid', '105', 'com.jens.automation2'),
|
||||
fdroidserver.common.parse_androidmanifests(paths, app))
|
||||
|
||||
app = fdroidserver.metadata.App()
|
||||
build = fdroidserver.metadata.Build()
|
||||
build.gradle = ['VAR', 'prod']
|
||||
app['Builds'] = [build]
|
||||
app.id = 'de.varengold.activeTAN'
|
||||
paths = [
|
||||
os.path.join('source-files', 'de.varengold.activeTAN', 'build.gradle'),
|
||||
]
|
||||
for path in paths:
|
||||
self.assertTrue(os.path.isfile(path))
|
||||
self.assertEqual(('2021-06-30', '34', 'de.varengold.activeTAN'),
|
||||
fdroidserver.common.parse_androidmanifests(paths, app))
|
||||
|
||||
def test_get_all_gradle_and_manifests(self):
|
||||
"""Test whether the function works with relative and absolute paths"""
|
||||
a = fdroidserver.common.get_all_gradle_and_manifests(Path('source-files/cn.wildfirechat.chat'))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue