From 25207801c83bc3367ecaff85378d366a9b26320e Mon Sep 17 00:00:00 2001 From: Joran Honig Date: Thu, 16 Jul 2020 15:03:33 +0200 Subject: [PATCH] mock execution_info --- tests/mythril/mythril_analyzer_test.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/mythril/mythril_analyzer_test.py b/tests/mythril/mythril_analyzer_test.py index 0e826cc8..2f100ac1 100644 --- a/tests/mythril/mythril_analyzer_test.py +++ b/tests/mythril/mythril_analyzer_test.py @@ -1,7 +1,7 @@ from pathlib import Path from mythril.mythril import MythrilDisassembler, MythrilAnalyzer from mythril.analysis.report import Issue -from mock import patch +from mock import patch, PropertyMock @patch("mythril.analysis.report.Issue.add_code_info", return_value=None) @@ -9,8 +9,9 @@ from mock import patch "mythril.mythril.mythril_analyzer.fire_lasers", return_value=[Issue("", "", "234", "101", "title", "0x02445")], ) -@patch("mythril.mythril.mythril_analyzer.SymExecWrapper", return_value=None) +@patch("mythril.mythril.mythril_analyzer.SymExecWrapper") def test_fire_lasers(mock_sym, mock_fire_lasers, mock_code_info): + type(mock_sym.return_value).execution_info = PropertyMock(return_value=[]) disassembler = MythrilDisassembler(eth=None) disassembler.load_from_solidity( [