test to check that the right Builds flag values get removed

This commit is contained in:
Hans-Christoph Steiner 2023-05-23 12:07:56 +02:00
parent f68b77a933
commit dbf163e03f
1 changed files with 19 additions and 0 deletions

View File

@ -115,6 +115,25 @@ class RewriteMetaTest(unittest.TestCase):
[{'versionCode': 0}],
)
def test_remove_blank_flags_from_builds_values_to_purge(self):
self.assertEqual(
rewritemeta.remove_blank_flags_from_builds(
[
{
'antifeatures': dict(),
'forceversion': False,
'init': None,
'rm': '',
'scandelete': list(),
'versionCode': 0,
},
{'antifeatures': list(), 'versionCode': 1},
{'antifeatures': '', 'versionCode': 2},
]
),
[{'versionCode': 0}, {'versionCode': 1}, {'versionCode': 2}],
)
def test_rewrite_no_builds(self):
os.chdir(self.testdir)
Path('metadata').mkdir()