def context(score_db):
    context = IconScoreContext(IconScoreContextType.DIRECT)
    context.current_address = score_db.address

    ContextContainer._push_context(context)
    yield context
    ContextContainer._clear_context()
def set_container_and_intercall_before_test(monkeypatch, context):
    monkeypatch.setattr(InternalCall, "_other_score_call", Mock())
    ContextContainer._push_context(context)
    yield
    ContextContainer._clear_context()
    monkeypatch.undo()
示例#3
0
 def tearDown(self):
     ContextContainer._clear_context()
     clear_inner_task()
示例#4
0
 def tearDown(self):
     ContextContainer._clear_context()
     clear_inner_task()
     VirtualStepCalculator.calculate_virtual_step = calculate_virtual_step
 def tearDown(self):
     ContextContainer._clear_context()
     self._mock_icon_score = None