deploy: make androidobservatory and virustotal functions reusable

This should not change the logic at all, just make the loop runs into
standalone functions.
This commit is contained in:
Hans-Christoph Steiner 2020-03-03 14:38:14 +01:00
parent 733e7be1b3
commit b7901952a1
3 changed files with 134 additions and 105 deletions

View file

@ -142,6 +142,12 @@ class ServerTest(unittest.TestCase):
repo_section)
self.assertEqual(call_iteration, 2, 'expected 2 invocations of subprocess.call')
@unittest.skipIf(not os.getenv('VIRUSTOTAL_API_KEY'), 'VIRUSTOTAL_API_KEY is not set')
def test_upload_to_virustotal(self):
fdroidserver.server.options.verbose = True
virustotal_apikey = os.getenv('VIRUSTOTAL_API_KEY')
fdroidserver.server.upload_to_virustotal('repo', virustotal_apikey)
if __name__ == "__main__":
os.chdir(os.path.dirname(__file__))