Handle duplicate apps in a much cleaner way

Don't log and exit in an inner metadata function. Handle it at a higher
level and do a proper exception. This also avoids unnecessary passing of
apps all around.
This commit is contained in:
Daniel Martí 2015-11-28 12:16:23 +01:00
parent ce2f4a115c
commit de12cfdbe1
3 changed files with 19 additions and 22 deletions

View file

@ -30,8 +30,7 @@ class ImportTest(unittest.TestCase):
fdroidserver.common.config['sdk_path'] = '/fake/path/to/android-sdk'
url = 'https://gitlab.com/fdroid/fdroidclient'
apps = dict()
appid, app = fdroidserver.metadata.get_default_app_info_list(apps)
appid, app = fdroidserver.metadata.get_default_app_info()
app['Update Check Mode'] = "Tags"
root_dir, src_dir = import_proxy.get_metadata_from_url(app, url)
self.assertEquals(app['Repo Type'], 'git')