1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-04 22:40:12 +01:00
fdroidserver/tests/metadata
Hans-Christoph Steiner b7fc7f2228 convert App to subclass of dict to support parsing/dumping libs
Python is heavily based on its core data types, and dict is one of the more
important ones.  Even classes are basically a wrapper around a dict. This
converts metadata.App to be a subclass of dict so it can behave like a dict
when being dumped and loaded.  This makes its drastically easier to use
different data formats for build metadata and for sending data to the
client.  This approach will ultimately mean we no longer have to maintain
custom parsing and dumping code.

This also means then that the YAML/JSON field names will not have spaces in
them, and they will match exactly what it used as the dict keys once the
data is parsed, as well as matching exactly the instance attribute names:

* CurrentVersion: 1.2.6
* app['CurrentVersion'] == '1.2.6'
* app.CurrentVersion == '1.2.6'

Inspired by:
https://goodcode.io/articles/python-dict-object/
2017-02-24 11:01:01 +01:00
..
dump convert App to subclass of dict to support parsing/dumping libs 2017-02-24 11:01:01 +01:00
info.guardianproject.checkey.txt allow metadata to be embedded in source repos via .fdroid.yml 2016-11-16 23:28:03 +01:00
info.guardianproject.urzip.txt use utf-8 as default encoding for config.py 2016-02-17 00:26:16 +01:00
obb.main.oldversion.txt tests for finding the proper OBB files for each APK 2016-07-07 22:34:41 +02:00
obb.main.twoversions.txt tests for finding the proper OBB files for each APK 2016-07-07 22:34:41 +02:00
obb.mainpatch.current.txt tests for finding the proper OBB files for each APK 2016-07-07 22:34:41 +02:00
org.adaway.json convert App to subclass of dict to support parsing/dumping libs 2017-02-24 11:01:01 +01:00
org.fdroid.ci.test.app.txt allow metadata to be embedded in source repos via .fdroid.yml 2016-11-16 23:28:03 +01:00
org.smssecure.smssecure.txt add test for metadata parsing based on a parse output to a pickle 2015-09-01 11:39:50 +02:00
org.videolan.vlc.yml convert App to subclass of dict to support parsing/dumping libs 2017-02-24 11:01:01 +01:00
raw.template.txt allow metadata to be embedded in source repos via .fdroid.yml 2016-11-16 23:28:03 +01:00