"""Integration tests for hardened web tools."""

import pytest
from deerflow.community.searx.tools import web_search_tool


class TestHardenedSearxSearch:
    """Test hardened SearX search against prompt injection."""
    
    def test_search_results_are_delimited(self):
        """Results must be wrapped in security delimiters."""
        result = web_search_tool("test query")
        
        assert "<<<EXTERNAL_UNTRUSTED_CONTENT>>>" in result
        assert "<<<END_EXTERNAL_UNTRUSTED_CONTENT>>>" in result