From d0368d0ad8b4debc2206e7fe54cd1c1d3049b684 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20P=C3=B6hn?= Date: Tue, 23 Jul 2019 22:44:45 +0200 Subject: [PATCH] common add parse_androidmanifests_ignore test --- tests/common.TestCase | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/common.TestCase b/tests/common.TestCase index 52e48d89..f99150ea 100755 --- a/tests/common.TestCase +++ b/tests/common.TestCase @@ -806,6 +806,19 @@ class CommonTest(unittest.TestCase): self.assertEqual(('0.94-test', '940', 'org.fdroid.fdroid'), fdroidserver.common.parse_androidmanifests(paths, app)) + def test_parse_androidmanifests_ignore(self): + app = fdroidserver.metadata.App() + app.id = 'org.fdroid.fdroid' + app.UpdateCheckIgnore = '-test' + paths = [ + os.path.join('source-files', 'fdroid', 'fdroidclient', 'AndroidManifest.xml'), + os.path.join('source-files', 'fdroid', 'fdroidclient', 'build.gradle'), + ] + for path in paths: + self.assertTrue(os.path.isfile(path)) + self.assertEqual(('Ignore', None, 'org.fdroid.fdroid'), + fdroidserver.common.parse_androidmanifests(paths, app)) + def test_parse_androidmanifests_with_flavor(self): app = fdroidserver.metadata.App() build = fdroidserver.metadata.Build()