mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-13 22:42:29 +03:00
update: test archive_old_apks() with ArchivePolicy: 0
This commit is contained in:
parent
9ac7dfe452
commit
d96de4d8c2
1 changed files with 11 additions and 0 deletions
|
@ -1757,6 +1757,17 @@ class UpdateTest(unittest.TestCase):
|
||||||
apks, cachechanged = fdroidserver.update.process_apks({}, 'repo', knownapks, False, apps)
|
apks, cachechanged = fdroidserver.update.process_apks({}, 'repo', knownapks, False, apps)
|
||||||
self.assertEqual([], apks)
|
self.assertEqual([], apks)
|
||||||
|
|
||||||
|
def test_archive_old_apks_ArchivePolicy_0(self):
|
||||||
|
app = fdroidserver.metadata.App()
|
||||||
|
app.id = 'test'
|
||||||
|
app.ArchivePolicy = 0
|
||||||
|
apps = {app.id: app}
|
||||||
|
with self.assertLogs(level='DEBUG') as cm:
|
||||||
|
fdroidserver.update.archive_old_apks(apps, [], [], '', '', 3)
|
||||||
|
self.assertEqual(cm.output, [
|
||||||
|
"DEBUG:root:Checking archiving for test - apks:0, keepversions:0, archapks:0"
|
||||||
|
])
|
||||||
|
|
||||||
def test_archive_old_apks(self):
|
def test_archive_old_apks(self):
|
||||||
app = fdroidserver.metadata.App()
|
app = fdroidserver.metadata.App()
|
||||||
app.id = 'test'
|
app.id = 'test'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue