@@ -41,7 +41,7 @@ def test_burr_kwargs():
4141 "llm" : {"model" : "openai/gpt-3.5-turbo" , "openai_api_key" : "sk-test" },
4242 "burr_kwargs" : {"some_key" : "some_value" },
4343 }
44- graph = TestGraph ("Test prompt" , config )
44+ TestGraph ("Test prompt" , config )
4545 # Check that the burr_kwargs have been applied and an app_instance_id added if missing
4646 assert dummy_graph .use_burr is True
4747 assert dummy_graph .burr_config ["some_key" ] == "some_value"
@@ -59,14 +59,14 @@ def test_set_common_params():
5959 mock_node2 = Mock ()
6060 mock_graph .nodes = [mock_node1 , mock_node2 ]
6161 # Create a TestGraph instance with the mock graph
62- with patch (
63- "scrapegraphai.graphs.abstract_graph.AbstractGraph._create_graph" ,
64- return_value = mock_graph ,
65- ):
62+ with patch .object (TestGraph , "_create_graph" , return_value = mock_graph ):
6663 graph = TestGraph (
6764 "Test prompt" ,
6865 {"llm" : {"model" : "openai/gpt-3.5-turbo" , "openai_api_key" : "sk-test" }},
6966 )
67+ # Reset mock call counts before testing set_common_params
68+ mock_node1 .update_config .reset_mock ()
69+ mock_node2 .update_config .reset_mock ()
7070 # Call set_common_params with test parameters
7171 test_params = {"param1" : "value1" , "param2" : "value2" }
7272 graph .set_common_params (test_params )
0 commit comments