From ceef07d2f2503b9f2eed2a2f607f93db860d6feb Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Wed, 19 Apr 2023 09:45:17 +0200 Subject: [PATCH] test of current internal format of mirrors list in config --- tests/index.TestCase | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/index.TestCase b/tests/index.TestCase index 30ec0e12..d0ccec08 100755 --- a/tests/index.TestCase +++ b/tests/index.TestCase @@ -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__))