mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-14 11:10:30 +03:00
[checkupdates] UpdateCheckData warn if file was not found
Instead of throwing an exception.
This commit is contained in:
parent
2bdd569eb0
commit
69a0a7da39
2 changed files with 18 additions and 7 deletions
|
|
@ -212,8 +212,11 @@ class CheckupdatesTest(unittest.TestCase):
|
|||
vcs.latesttags.return_value = ['1.1.8', '1.1.9']
|
||||
with mock.patch(
|
||||
'pathlib.Path.read_text', lambda a: 'v1.1.9\nc10109'
|
||||
) as _ignored, mock.patch('fdroidserver.common.getvcs', return_value=vcs):
|
||||
) as _ignored, mock.patch.object(
|
||||
Path, 'is_file'
|
||||
) as mock_path, mock.patch('fdroidserver.common.getvcs', return_value=vcs):
|
||||
_ignored # silence the linters
|
||||
mock_path.is_file.return_falue = True
|
||||
vername, vercode, _tag = fdroidserver.checkupdates.check_tags(app, None)
|
||||
self.assertEqual(vername, '1.1.9')
|
||||
self.assertEqual(vercode, '10109')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue