test of current internal format of mirrors list in config

This commit is contained in:
Hans-Christoph Steiner 2023-04-19 09:45:17 +02:00 committed by Michael Pöhn
parent c4d202f2d8
commit ceef07d2f2
1 changed files with 12 additions and 0 deletions

View File

@ -654,6 +654,18 @@ class IndexTest(unittest.TestCase):
metadata['webSite'],
)
def test_add_mirrors_to_repodict(self):
"""Test based on the contents of tests/config.py"""
repodict = dict()
fdroidserver.index.add_mirrors_to_repodict('repo', repodict)
self.assertEqual(
repodict['mirrors'],
[
'http://foobarfoobarfoobar.onion/fdroid/repo',
'https://foo.bar/fdroid/repo',
],
)
if __name__ == "__main__":
os.chdir(os.path.dirname(__file__))