Fix URLComponent build method and update test_url_component
This commit is contained in:
parent
c7fc2eb4af
commit
8139b743c2
2 changed files with 3 additions and 2 deletions
|
|
@ -15,7 +15,7 @@ class URLComponent(CustomComponent):
|
|||
"urls": {"display_name": "URL"},
|
||||
}
|
||||
|
||||
async def build(
|
||||
def build(
|
||||
self,
|
||||
urls: list[str],
|
||||
) -> list[Record]:
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue