mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-13 14:32:28 +03:00
basic downloading for scan_binary signatures
This commit is contained in:
parent
82355b8559
commit
f56b1f3012
5 changed files with 351 additions and 62 deletions
|
@ -36,8 +36,7 @@ class TmpCwd():
|
|||
|
||||
|
||||
class TmpPyPath():
|
||||
"""Context-manager for temporarily changing the current working
|
||||
directory.
|
||||
"""Context-manager for temporarily adding a direcory to python path
|
||||
"""
|
||||
|
||||
def __init__(self, additional_path):
|
||||
|
@ -48,3 +47,9 @@ class TmpPyPath():
|
|||
|
||||
def __exit__(self, a, b, c):
|
||||
sys.path.remove(self.additional_path)
|
||||
|
||||
|
||||
def mock_open_to_str(mock):
|
||||
return "".join([
|
||||
x.args[0] for x in mock.mock_calls if str(x).startswith("call().write(")
|
||||
])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue