test load_localized_config() with categories

This commit is contained in:
Hans-Christoph Steiner 2023-05-30 22:43:21 +02:00
parent bc58959315
commit 6b82710039
6 changed files with 76 additions and 3 deletions

View file

@ -2694,6 +2694,23 @@ class CommonTest(unittest.TestCase):
p = Path(os.path.dirname(__file__) + '/repo' + v['icon']['en-US']['name'])
self.assertTrue(p.exists())
def test_load_localized_config_categories(self):
"""It should load"""
categories = fdroidserver.common.load_localized_config('categories', 'repo')
self.assertEqual(
[
'Time',
'Development',
'GuardianProject',
'Multimedia',
'Phone & SMS',
'Security',
'System',
],
list(categories.keys()),
)
self.assertEqual(['en-US'], list(categories['GuardianProject']['name'].keys()))
if __name__ == "__main__":
os.chdir(os.path.dirname(__file__))