mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-04 22:40:29 +03:00
Catch DefusedXmlException (as ValueError)
defusedxml can't handle the nbsp in the strings.xml (etree can).
This commit is contained in:
parent
7e1d974351
commit
7822db2881
5 changed files with 1345 additions and 3 deletions
|
|
@ -1168,6 +1168,17 @@ class CommonTest(unittest.TestCase):
|
|||
self.assertEqual(('0.3.10', '29', 'dev.patrickgold.florisboard'),
|
||||
fdroidserver.common.parse_androidmanifests(paths, app))
|
||||
|
||||
app = fdroidserver.metadata.App()
|
||||
app.id = 'com.ubergeek42.WeechatAndroid'
|
||||
paths = [
|
||||
os.path.join('source-files', 'com.ubergeek42.WeechatAndroid', 'app', 'build.gradle.kts'),
|
||||
os.path.join('source-files', 'com.ubergeek42.WeechatAndroid', 'app', 'src', 'main', 'res', 'values', 'strings.xml'),
|
||||
]
|
||||
for path in paths:
|
||||
self.assertTrue(os.path.isfile(path))
|
||||
self.assertEqual(('1.8.1', '1_08_01', None),
|
||||
fdroidserver.common.parse_androidmanifests(paths, app))
|
||||
|
||||
def test_parse_androidmanifests_ignore(self):
|
||||
app = fdroidserver.metadata.App()
|
||||
app.id = 'org.fdroid.fdroid'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue