feat(p1): persist workflows and semantic learning artifacts
This commit is contained in:
@@ -346,6 +346,28 @@ class TestMergeResults:
|
||||
|
||||
|
||||
class TestEnrichActionsWithIntentions:
|
||||
@patch("requests.post")
|
||||
@patch("requests.get")
|
||||
def test_enrichissement_desactive_par_flag(
|
||||
self,
|
||||
mock_get,
|
||||
mock_post,
|
||||
monkeypatch,
|
||||
tmp_path,
|
||||
):
|
||||
"""Le flag demo evite tout appel Ollama pendant le build replay."""
|
||||
from agent_v0.server_v1.stream_processor import _enrich_actions_with_intentions
|
||||
|
||||
monkeypatch.setenv("RPA_SKIP_INTENTION_ENRICHMENT", "1")
|
||||
actions = [
|
||||
{"type": "click", "action_id": "act_001", "target_spec": {"by_text": "OK"}},
|
||||
]
|
||||
|
||||
_enrich_actions_with_intentions(actions, tmp_path)
|
||||
|
||||
assert "intention" not in actions[0]
|
||||
mock_get.assert_not_called()
|
||||
mock_post.assert_not_called()
|
||||
|
||||
@patch("requests.post")
|
||||
@patch("requests.get")
|
||||
|
||||
Reference in New Issue
Block a user