scanner: safely check options, for things using this API

https://gitlab.com/fdroid/fdroidserver/-/issues/771#note_353495799
This commit is contained in:
Hans-Christoph Steiner 2020-06-03 18:34:26 +02:00
parent 75acf63efa
commit ee54dbce87
3 changed files with 3 additions and 4 deletions

View file

@ -36,7 +36,7 @@ class ScannerTest(unittest.TestCase):
os.chdir(self.basedir)
def test_scan_source_files(self):
fdroidserver.scanner.options = type('', (), {})()
fdroidserver.scanner.options = mock.Mock()
fdroidserver.scanner.options.json = False
source_files = os.path.join(self.basedir, 'source-files')
projects = {