Skip to content

Commit c31706f

Browse files
fixed tests
Co-Authored-By: Matteo Vedovati <[email protected]>
1 parent 09cb6e9 commit c31706f

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

tests/graphs/script_generator_test.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,3 @@ def test_script_creator_graph(graph_config: dict):
3737
)
3838
result = smart_scraper_graph.run()
3939
assert result is not None, "ScriptCreatorGraph execution failed to produce a result."
40-
graph_exec_info = smart_scraper_graph.get_execution_info()
41-
assert graph_exec_info is not None, "ScriptCreatorGraph execution info is None."
42-
prettified_exec_info = prettify_exec_info(graph_exec_info)
43-
print(prettified_exec_info)
44-
45-
# Perform additional assertions on the result or execution info as needed

tests/nodes/fetch_node_test.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from scrapegraphai.nodes import FetchNode
22
from langchain_core.documents import Document
33

4-
54
def test_fetch_html(mocker):
65
title = "ScrapeGraph AI"
76
link_url = "https://github.com/VinciGit00/Scrapegraph-ai"
@@ -29,9 +28,10 @@ def test_fetch_html(mocker):
2928

3029
mock_loader.load.assert_called_once()
3130
doc = result["doc"][0]
32-
assert title in doc.page_content
33-
assert link_url in result["links"]
34-
assert img_url in result["images"]
31+
assert result is not None
32+
assert "ScrapeGraph AI" in doc.page_content
33+
assert "https://github.com/VinciGit00/Scrapegraph-ai" in doc.page_content
34+
assert "https://raw.githubusercontent.com/VinciGit00/Scrapegraph-ai/main/docs/assets/scrapegraphai_logo.png" in doc.page_content
3535

3636

3737
def test_fetch_json():

0 commit comments

Comments
 (0)