fix(test): Fix test that was being skipped because of missing async marker

- Fix a test case in test_web_selenium.py that was failing due to a missing `pytest.mark.asyncio`
pull/6497/head
Reinier van der Leer 2023-12-05 15:34:39 +01:00
parent b73fa47089
commit 47dc5ad220
No known key found for this signature in database
GPG Key ID: CDC1180FDAE06193
1 changed files with 2 additions and 1 deletions

View File

@ -6,13 +6,14 @@ from autogpt.commands.web_selenium import BrowsingError, read_webpage
@pytest.mark.vcr
@pytest.mark.requires_openai_api_key
@pytest.mark.asyncio
async def test_browse_website_nonexistent_url(
agent: Agent, patched_api_requestor: None
):
url = "https://auto-gpt-thinks-this-website-does-not-exist.com"
question = "How to execute a barrel roll"
with pytest.raises(BrowsingError, match=r"NAME_NOT_RESOLVED") as raised:
with pytest.raises(BrowsingError, match="NAME_NOT_RESOLVED") as raised:
await read_webpage(url=url, question=question, agent=agent)
# Sanity check that the response is not too long