File tree Expand file tree Collapse file tree
tests/unit/executor/workflow Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -91,9 +91,11 @@ def workflow(
9191 mock_attack_setup_target : MagicMock , mock_scorer : MagicMock , mock_prompt_normalizer : MagicMock
9292) -> XPIAWorkflow :
9393 """Create an XPIA workflow instance for testing."""
94- return XPIAWorkflow (
94+ workflow = XPIAWorkflow (
9595 attack_setup_target = mock_attack_setup_target , scorer = mock_scorer , prompt_normalizer = mock_prompt_normalizer
9696 )
97+ workflow ._memory = MagicMock ()
98+ return workflow
9799
98100
99101@pytest .mark .usefixtures ("patch_central_database" )
@@ -237,6 +239,7 @@ async def test_perform_async_workflow_without_scorer(
237239 workflow = XPIAWorkflow (
238240 attack_setup_target = mock_attack_setup_target , scorer = None , prompt_normalizer = mock_prompt_normalizer
239241 )
242+ workflow ._memory = MagicMock ()
240243
241244 # Setup mock responses
242245 mock_response = MagicMock ()
You can’t perform that action at this time.
0 commit comments