basic downloading for scan_binary signatures

This commit is contained in:
Michael Pöhn 2022-09-22 01:33:23 +02:00
parent 82355b8559
commit f56b1f3012
5 changed files with 351 additions and 62 deletions

View file

@ -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(")
])