Skip to content

Commit

Permalink
Test: Updated to async function testing for compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
yeounhak committed Dec 5, 2024
1 parent 78d0519 commit 6f99252
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def test_lazy_load(mock_get: Any) -> None:

@pytest.mark.requires("bs4")
@patch("aiohttp.ClientSession.get")
def test_aload(mock_get: Any) -> None:
async def test_aload(mock_get: Any) -> None:
async def mock_text() -> str:
return "<html><body><p>Test content</p></body></html>"

Expand All @@ -76,7 +76,7 @@ async def mock_text() -> str:
web_paths=["https://www.example.com"],
header_template={"User-Agent": "test-user-agent"},
)
results = loader.aload()
results = await loader.aload()
assert len(results) == 1
assert results[0].page_content == "Test content"
mock_get.assert_called_with(
Expand Down

0 comments on commit 6f99252

Please sign in to comment.