1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-10 17:30:11 +01:00

test: add test_copy_repo_icon()

This commit is contained in:
Angel 2024-01-14 19:20:42 -05:00
parent e5ae22ac83
commit 901b05e14a
No known key found for this signature in database
GPG Key ID: 9FBE6953EFB306BE

View File

@ -442,6 +442,25 @@ class IndexTest(unittest.TestCase):
)
self.assertTrue(os.path.exists(os.path.join('repo', 'index.xml')))
def test_copy_repo_icon(self):
os.chdir(self.testdir)
os.mkdir('repo')
repo_icons_dir = os.path.join('repo', 'icons')
self.assertFalse(os.path.isdir(repo_icons_dir))
common.config['repo_icon'] = 'test_icon.png'
self.assertFalse(
os.path.exists(
os.path.join(repo_icons_dir, common.config['repo_icon'])
)
)
index.copy_repo_icon('repo')
self.assertTrue(os.path.isdir(repo_icons_dir))
self.assertTrue(
os.path.exists(
os.path.join(repo_icons_dir, common.config['repo_icon'])
)
)
def test_make_v0(self):
os.chdir(self.testdir)
os.mkdir('metadata')