mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2026-01-04 14:54:32 +01:00
Migrate google search to use DDGS.text function (#4383)
This commit is contained in:
@@ -42,7 +42,7 @@ def test_google_search(query, num_results, expected_output, return_value, mocker
|
||||
mock_ddg = mocker.Mock()
|
||||
mock_ddg.return_value = return_value
|
||||
|
||||
mocker.patch("autogpt.commands.google_search.ddg", mock_ddg)
|
||||
mocker.patch("autogpt.commands.google_search.DDGS.text", mock_ddg)
|
||||
actual_output = google_search(query, num_results=num_results)
|
||||
expected_output = safe_google_results(expected_output)
|
||||
assert actual_output == expected_output
|
||||
|
||||
Reference in New Issue
Block a user