1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-10-03 17:50:11 +02:00
fdroidserver/tests
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
..
getsig include test cases for python getsig replacement 2014-11-07 09:20:33 +00:00
gnupghome gpg-sign all valid files in the repo, including source tarballs 2016-11-07 14:53:01 +01:00
metadata convert App to subclass of dict to support parsing/dumping libs 2017-02-24 11:01:01 +01:00
repo test for original "v0" index XML compatibility 2017-02-24 11:01:01 +01:00
source-files build: improve regsub pattern for setting buildToolsVersion 2015-08-19 17:55:17 +02:00
stats test for original "v0" index XML compatibility 2017-02-24 11:01:01 +01:00
build.TestCase add force_build_tools config option 2016-06-21 10:29:56 +02:00
common.TestCase all: make newer pycodestyle happy 2016-11-15 20:55:06 +00:00
complete-ci-tests gitlab-ci: workaround "ImportError: No module named 'packaging'" 2017-02-06 17:28:07 +01:00
config.py test for original "v0" index XML compatibility 2017-02-24 11:01:01 +01:00
description-parsing.py tests: switch to python3 2016-03-11 13:27:00 +00:00
import_proxy.py add a basic test of fdroid import 2015-09-10 11:08:40 +02:00
import.TestCase convert App to subclass of dict to support parsing/dumping libs 2017-02-24 11:01:01 +01:00
install.TestCase refactor env handling for FDroidPopen to support .fdroid.* metadata 2016-03-23 17:16:27 +01:00
keystore.jks test for original "v0" index XML compatibility 2017-02-24 11:01:01 +01:00
metadata.TestCase convert App to subclass of dict to support parsing/dumping libs 2017-02-24 11:01:01 +01:00
run-tests test for original "v0" index XML compatibility 2017-02-24 11:01:01 +01:00
update.TestCase remove support for XML app metadata, its broken 2016-12-05 20:16:54 +01:00
urzip-badcert.apk include test cases for python getsig replacement 2014-11-07 09:20:33 +00:00
urzip-badsig.apk include test cases for python getsig replacement 2014-11-07 09:20:33 +00:00
urzip-release-unsigned.apk added test case for common.isApkDebuggable() 2014-12-14 13:25:20 +01:00
urzip-release.apk added test case for common.isApkDebuggable() 2014-12-14 13:25:20 +01:00
urzip.apk tests: try fdroid update after adding an APK to an existing repo 2014-06-04 21:54:55 -04:00