Fix URLComponent build method and update test_url_component

This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-03-08 23:41:35 -03:00
commit 8139b743c2
2 changed files with 3 additions and 2 deletions

View file

@ -15,7 +15,7 @@ class URLComponent(CustomComponent):
"urls": {"display_name": "URL"},
}
async def build(
def build(
self,
urls: list[str],
) -> list[Record]:

View file

@ -172,4 +172,5 @@ def test_directory_without_mocks():
def test_url_component():
url_component = data.URLComponent()
# the url component can be used to load the contents of a website
record = url_component.build("https://example.com")
records = url_component.build(["https://langflow.org"])
assert all(record.data for record in records)