mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-13 22:42:29 +03:00
metadata: type conversion happens at parsing, not at writing
These test cases were writing assuming they had to transform the data format. That is no longer the case. Going forward, the parsing process converts everything to a standardized format. That will hopefully be enforceable by the JSON Schema in the future.
This commit is contained in:
parent
26b2cffdcc
commit
e64f121c0c
1 changed files with 2 additions and 6 deletions
|
@ -720,7 +720,7 @@ class MetadataTest(unittest.TestCase):
|
|||
build.versionCode = '0' # taken from fdroidserver/import.py
|
||||
build.disable = 'Generated by import.py ...'
|
||||
build.commit = 'Unknown'
|
||||
build.gradle = [True]
|
||||
build.gradle = ['yes']
|
||||
app['Builds'] = [build]
|
||||
|
||||
fdroidserver.metadata.write_yaml(mf, app)
|
||||
|
@ -745,7 +745,7 @@ class MetadataTest(unittest.TestCase):
|
|||
disable: Generated by import.py ...
|
||||
commit: Unknown
|
||||
gradle:
|
||||
- true
|
||||
- yes
|
||||
|
||||
AutoUpdateMode: None
|
||||
UpdateCheckMode: Tags
|
||||
|
@ -1886,10 +1886,6 @@ class MetadataTest(unittest.TestCase):
|
|||
app = metadata.App({'Builds': [metadata.Build({'rm': []})]})
|
||||
self.assertEqual(dict(), metadata._app_to_yaml(app)['Builds'][0])
|
||||
|
||||
def test_app_to_yaml_build_list_string(self):
|
||||
app = metadata.App({'Builds': [metadata.Build({'rm': 'one'})]})
|
||||
self.assertEqual({'rm': 'one'}, metadata._app_to_yaml(app)['Builds'][0])
|
||||
|
||||
def test_app_to_yaml_build_list_one(self):
|
||||
app = metadata.App({'Builds': [metadata.Build({'rm': ['one']})]})
|
||||
self.assertEqual({'rm': ['one']}, metadata._app_to_yaml(app)['Builds'][0])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue