mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-15 19:50:29 +03:00
Index v2
This commit is contained in:
parent
45e79b1223
commit
d70e5c2cd9
10 changed files with 677 additions and 53 deletions
|
|
@ -56,17 +56,17 @@ class SignindexTest(unittest.TestCase):
|
|||
def tearDown(self):
|
||||
self.tempdir.cleanup()
|
||||
|
||||
def test_sign_index_v1(self):
|
||||
def test_sign_index(self):
|
||||
shutil.copy(str(self.basedir / 'repo/index-v1.json'), 'repo')
|
||||
signindex.sign_index_v1(str(self.repodir), 'index-v1.json')
|
||||
signindex.sign_index(str(self.repodir), 'index-v1.json')
|
||||
self.assertTrue((self.repodir / 'index-v1.jar').exists())
|
||||
self.assertTrue((self.repodir / 'index-v1.json').exists())
|
||||
|
||||
def test_sign_index_v1_corrupt(self):
|
||||
def test_sign_index_corrupt(self):
|
||||
with open('repo/index-v1.json', 'w') as fp:
|
||||
fp.write('corrupt JSON!')
|
||||
with self.assertRaises(json.decoder.JSONDecodeError, msg='error on bad JSON'):
|
||||
signindex.sign_index_v1(str(self.repodir), 'index-v1.json')
|
||||
signindex.sign_index(str(self.repodir), 'index-v1.json')
|
||||
|
||||
def test_signindex(self):
|
||||
os.mkdir('archive')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue