1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-04 14:30:11 +01:00

metadata: test None in post_metadata_parse

This commit is contained in:
Hans-Christoph Steiner 2023-05-24 11:54:27 +02:00
parent d9b1d845e7
commit aa98d67c86

View File

@ -1999,6 +1999,16 @@ class PostMetadataParseTest(unittest.TestCase):
app['Builds'][0][tested_key] = expected app['Builds'][0][tested_key] = expected
return app, post return app, post
def test_post_metadata_parse_none(self):
"""Run None aka YAML null or blank through the various field and flag types."""
self.assertEqual(*self._post_metadata_parse_app_list(None, None))
self.assertEqual(*self._post_metadata_parse_app_string(None, None))
self.assertEqual(*self._post_metadata_parse_build_bool(None, None))
self.assertEqual(*self._post_metadata_parse_build_int(None, None))
self.assertEqual(*self._post_metadata_parse_build_list(None, None))
self.assertEqual(*self._post_metadata_parse_build_script(None, None))
self.assertEqual(*self._post_metadata_parse_build_string(None, None))
def test_post_metadata_parse_int(self): def test_post_metadata_parse_int(self):
"""Run the int 123456 through the various field and flag types.""" """Run the int 123456 through the various field and flag types."""
with self.assertRaises(TypeError): with self.assertRaises(TypeError):