mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-04 22:40:12 +01:00
test that write yaml does not write provides
This commit is contained in:
parent
723bd110a6
commit
6e48663230
@ -539,6 +539,34 @@ class MetadataTest(unittest.TestCase):
|
||||
UpdateCheckMode: None
|
||||
"""))
|
||||
|
||||
def test_write_yaml_make_sure_provides_does_not_get_written(self):
|
||||
mf = io.StringIO()
|
||||
app = fdroidserver.metadata.App()
|
||||
app.Categories = ['None']
|
||||
app.Provides = 'this.is.deprecated'
|
||||
app.builds = []
|
||||
build = fdroidserver.metadata.Build()
|
||||
build.versionCode = 102030
|
||||
build.versionName = 'v1.2.3'
|
||||
build.gradle = ['yes']
|
||||
app.builds.append(build)
|
||||
fdroidserver.metadata.write_yaml(mf, app)
|
||||
mf.seek(0)
|
||||
self.assertEqual(mf.read(), textwrap.dedent("""\
|
||||
Categories:
|
||||
- None
|
||||
License: Unknown
|
||||
|
||||
Builds:
|
||||
- versionName: v1.2.3
|
||||
versionCode: 102030
|
||||
gradle:
|
||||
- yes
|
||||
|
||||
AutoUpdateMode: None
|
||||
UpdateCheckMode: None
|
||||
"""))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
os.chdir(os.path.dirname(__file__))
|
||||
|
Loading…
Reference in New Issue
Block a user