Refactor test_helper_components.py
This commit is contained in:
parent
4106118a84
commit
d4313a05ce
1 changed files with 2 additions and 6 deletions
|
|
@ -24,9 +24,7 @@ def test_document_to_record_component():
|
||||||
|
|
||||||
# Act
|
# Act
|
||||||
# Replace with your actual test data
|
# Replace with your actual test data
|
||||||
document = Document(
|
document = Document(page_content="key: value", metadata={"url": "https://example.com"})
|
||||||
page_content="key: value", metadata={"url": "https://example.com"}
|
|
||||||
)
|
|
||||||
result = document_to_record_component.build(document)
|
result = document_to_record_component.build(document)
|
||||||
|
|
||||||
# Assert
|
# Assert
|
||||||
|
|
@ -44,9 +42,7 @@ def test_uuid_generator_component():
|
||||||
# Act
|
# Act
|
||||||
build_config = frontend_node.get("template")
|
build_config = frontend_node.get("template")
|
||||||
field_name = "unique_id"
|
field_name = "unique_id"
|
||||||
build_config = uuid_generator_component.update_build_config(
|
build_config = uuid_generator_component.update_build_config(build_config, None, field_name)
|
||||||
build_config, None, field_name
|
|
||||||
)
|
|
||||||
unique_id = build_config["unique_id"]["value"]
|
unique_id = build_config["unique_id"]["value"]
|
||||||
result = uuid_generator_component.build(unique_id)
|
result = uuid_generator_component.build(unique_id)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue