Skip to content

Commit

Permalink
fixed tests
Browse files Browse the repository at this point in the history
Co-Authored-By: Matteo Vedovati <[email protected]>
  • Loading branch information
VinciGit00 and vedovati-matteo committed Jun 15, 2024
1 parent 09cb6e9 commit c31706f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
6 changes: 0 additions & 6 deletions tests/graphs/script_generator_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,3 @@ def test_script_creator_graph(graph_config: dict):
)
result = smart_scraper_graph.run()
assert result is not None, "ScriptCreatorGraph execution failed to produce a result."
graph_exec_info = smart_scraper_graph.get_execution_info()
assert graph_exec_info is not None, "ScriptCreatorGraph execution info is None."
prettified_exec_info = prettify_exec_info(graph_exec_info)
print(prettified_exec_info)

# Perform additional assertions on the result or execution info as needed
8 changes: 4 additions & 4 deletions tests/nodes/fetch_node_test.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from scrapegraphai.nodes import FetchNode
from langchain_core.documents import Document


def test_fetch_html(mocker):
title = "ScrapeGraph AI"
link_url = "https://github.com/VinciGit00/Scrapegraph-ai"
Expand Down Expand Up @@ -29,9 +28,10 @@ def test_fetch_html(mocker):

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


def test_fetch_json():
Expand Down

0 comments on commit c31706f

Please sign in to comment.