mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-16 04:00:30 +03:00
metadata: make linkresolver an actual object
Previously this was magically capturing the apps dict when passing it around as a function. This also moved the code to the metadata module. Add a test doing read_metadata where the linkresolver is used. This happens when the apps we read have a [[app.id]] link to another app.
This commit is contained in:
parent
a4177e5ec3
commit
03881154c6
6 changed files with 1240 additions and 18 deletions
|
|
@ -905,6 +905,14 @@ class MetadataTest(unittest.TestCase):
|
|||
'Subdir': None,
|
||||
'Prepare': None}})
|
||||
|
||||
def test_read_xref_metadata(self):
|
||||
fdroidserver.common.config = {'accepted_formats': ['yml']}
|
||||
os.chdir('xref')
|
||||
fdroidserver.metadata.warnings_action = 'error'
|
||||
apps = fdroidserver.metadata.read_metadata(xref=True)
|
||||
self.assertListEqual(list(apps.keys()),
|
||||
['aarddict.android', 'org.coolreader', 'org.geometerplus.zlibrary.ui.android'])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
os.chdir(os.path.dirname(__file__))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue