mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-28 03:14:32 +01:00
* Add links to github issues in the README and clarify run instructions * Rename agent subpackage to agents * Revert all unwanted changes * Use relative import in `agents/__init__.py` --------- Co-authored-by: Reinier van der Leer <github@pwuts.nl>
18 lines
540 B
Python
18 lines
540 B
Python
import pytest
|
|
from pytest_mock import MockerFixture
|
|
|
|
from autogpt.agents.agent import Agent
|
|
from autogpt.commands.web_selenium import browse_website
|
|
|
|
|
|
@pytest.mark.vcr
|
|
@pytest.mark.requires_openai_api_key
|
|
def test_browse_website(agent: Agent, patched_api_requestor: MockerFixture):
|
|
url = "https://barrel-roll.com"
|
|
question = "How to execute a barrel roll"
|
|
|
|
response = browse_website(url, question, agent)
|
|
assert "error" in response.lower()
|
|
# Sanity check that the response is not too long
|
|
assert len(response) < 200
|