fix tests on old python version
This commit is contained in:
parent
b25eeb66a1
commit
f2a80ffa3d
2
fdroid
2
fdroid
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
#
|
#
|
||||||
# fdroid.py - part of the FDroid server tools
|
# fdroid.py - part of the FDroid server tools
|
||||||
# Copyright (C) 2020 Michael Pöhn <michael.poehn@fsfe.org
|
# Copyright (C) 2020 Michael Pöhn <michael.poehn@fsfe.org>
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU Affero General Public License as published by
|
# it under the terms of the GNU Affero General Public License as published by
|
||||||
|
|
|
@ -52,7 +52,7 @@ class FdroidTest(unittest.TestCase):
|
||||||
with mock.patch('fdroidserver.init.main', co):
|
with mock.patch('fdroidserver.init.main', co):
|
||||||
with mock.patch('sys.exit', lambda x: None):
|
with mock.patch('sys.exit', lambda x: None):
|
||||||
fdroidserver.__main__.main()
|
fdroidserver.__main__.main()
|
||||||
co.assert_called_once()
|
co.assert_called_once_with()
|
||||||
|
|
||||||
def test_call_deploy(self):
|
def test_call_deploy(self):
|
||||||
co = mock.Mock()
|
co = mock.Mock()
|
||||||
|
@ -60,7 +60,7 @@ class FdroidTest(unittest.TestCase):
|
||||||
with mock.patch('fdroidserver.server.main', co):
|
with mock.patch('fdroidserver.server.main', co):
|
||||||
with mock.patch('sys.exit', lambda x: None):
|
with mock.patch('sys.exit', lambda x: None):
|
||||||
fdroidserver.__main__.main()
|
fdroidserver.__main__.main()
|
||||||
co.assert_called_once()
|
co.assert_called_once_with()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
Loading…
Reference in New Issue