Test that the scrape method works correctly for selenium by returning the dummy selenium content.
(monkeypatch)
| 100 | |
| 101 | @pytest.mark.asyncio |
| 102 | async def test_scrape_method_selenium(monkeypatch): |
| 103 | """Test that the scrape method works correctly for selenium by returning the dummy selenium content.""" |
| 104 | |
| 105 | async def dummy_selenium(url): |
| 106 | return f"<html>dummy selenium content for {url}</html>" |
| 107 | |
| 108 | urls = ["http://example.com"] |
| 109 | loader = ChromiumLoader(urls, backend="selenium") |
| 110 | loader.browser_name = "chromium" |
| 111 | monkeypatch.setattr(loader, "ascrape_undetected_chromedriver", dummy_selenium) |
| 112 | result = await loader.scrape("http://example.com") |
| 113 | assert "dummy selenium content" in result |
| 114 | |
| 115 | |
| 116 | @pytest.mark.asyncio |
nothing calls this directly
no test coverage detected