Files
Auto-GPT/tests/integration/test_web_selenium.py
2023-06-04 16:38:32 +02:00

15 lines
462 B
Python

from pytest_mock import MockerFixture
from autogpt.commands.web_selenium import browse_website
from autogpt.config import Config
def test_browse_website(config: Config, patched_api_requestor: MockerFixture):
url = "https://barrel-roll.com"
question = "How to execute a barrel roll"
response = browse_website(url, question, config)
assert "Error" in response
# Sanity check that the response is not too long
assert len(response) < 200