mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-09 08:08:32 +00:00
fix: use proper ArxivPaperTool import (#408)
This commit is contained in:
@@ -3,7 +3,7 @@ import urllib.error
|
|||||||
from unittest.mock import patch, MagicMock, mock_open
|
from unittest.mock import patch, MagicMock, mock_open
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
import xml.etree.ElementTree as ET
|
import xml.etree.ElementTree as ET
|
||||||
from crewai_tools.tools.arxiv_paper_tool import ArxivPaperTool
|
from crewai_tools import ArxivPaperTool
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def tool():
|
def tool():
|
||||||
@@ -97,7 +97,7 @@ def test_invalid_xml_response(mock_urlopen, tool):
|
|||||||
|
|
||||||
with pytest.raises(ET.ParseError):
|
with pytest.raises(ET.ParseError):
|
||||||
tool.fetch_arxiv_data("quantum", 1)
|
tool.fetch_arxiv_data("quantum", 1)
|
||||||
|
|
||||||
@patch.object(ArxivPaperTool, "fetch_arxiv_data")
|
@patch.object(ArxivPaperTool, "fetch_arxiv_data")
|
||||||
def test_run_with_max_results(mock_fetch, tool):
|
def test_run_with_max_results(mock_fetch, tool):
|
||||||
mock_fetch.return_value = [{
|
mock_fetch.return_value = [{
|
||||||
|
|||||||
Reference in New Issue
Block a user