repo
stringlengths
7
90
file_url
stringlengths
81
315
file_path
stringlengths
4
228
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 14:38:15
2026-01-05 02:33:18
truncated
bool
2 classes
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/integration/agent/test_print_response.py
libs/agno/tests/integration/agent/test_print_response.py
from unittest.mock import MagicMock, Mock, patch import pytest from rich.console import Console from rich.text import Text from agno.agent import Agent from agno.models.openai import OpenAIChat def test_print_response_with_message_panel(): """Test that print_response creates a message panel when show_message=Tr...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/integration/agent/test_tool_hooks.py
libs/agno/tests/integration/agent/test_tool_hooks.py
from typing import Any, Callable, Dict from unittest.mock import patch import pytest from agno.agent import Agent from agno.run.agent import RunOutput from agno.tools.decorator import tool from agno.utils.log import logger # --- Hooks Definition --- def logger_hook( function_name: str, function_call: Calla...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/integration/agent/test_rag.py
libs/agno/tests/integration/agent/test_rag.py
# Create a knowledge base of PDFs from URLs import asyncio import pytest import pytest_asyncio from agno.agent.agent import Agent from agno.knowledge.embedder.openai import OpenAIEmbedder from agno.knowledge.knowledge import Knowledge from agno.models.openai.chat import OpenAIChat from agno.vectordb.lancedb.lance_db ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/integration/agent/test_history.py
libs/agno/tests/integration/agent/test_history.py
import pytest from agno.agent import Agent from agno.models.openai import OpenAIChat @pytest.fixture def agent(shared_db): """Create a agent with db and memory for testing.""" def get_weather(city: str) -> str: return f"The weather in {city} is sunny." return Agent( model=OpenAIChat(id=...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/integration/agent/test_storage.py
libs/agno/tests/integration/agent/test_storage.py
import uuid import pytest from agno.agent.agent import Agent from agno.models.openai.chat import OpenAIChat from agno.run.base import RunStatus @pytest.fixture def agent(shared_db): """Create an agent with db and memory for testing.""" return Agent( model=OpenAIChat(id="gpt-4o"), db=shared_d...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/integration/agent/test_tool_call_limit.py
libs/agno/tests/integration/agent/test_tool_call_limit.py
import pytest from agno.agent.agent import Agent from agno.models.openai import OpenAIChat from agno.run.agent import RunEvent from agno.tools.yfinance import YFinanceTools def test_tool_use_tool_call_limit(): agent = Agent( model=OpenAIChat(id="gpt-4o-mini"), tools=[YFinanceTools(cache_results=T...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/integration/agent/test_guardrails.py
libs/agno/tests/integration/agent/test_guardrails.py
import pytest from agno.agent import Agent from agno.exceptions import CheckTrigger, InputCheckError from agno.guardrails import OpenAIModerationGuardrail, PIIDetectionGuardrail, PromptInjectionGuardrail from agno.media import Image from agno.models.openai import OpenAIChat from agno.run.agent import RunInput from agn...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/integration/agent/human_in_the_loop/test_user_input_flows.py
libs/agno/tests/integration/agent/human_in_the_loop/test_user_input_flows.py
import asyncio import pytest from agno.agent import Agent, RunOutput # noqa from agno.models.openai import OpenAIChat from agno.tools.decorator import tool def test_tool_call_requires_user_input(): @tool(requires_user_input=True) def get_the_weather(city: str): return f"It is currently 70 degrees a...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/integration/agent/human_in_the_loop/test_user_confirmation_flows.py
libs/agno/tests/integration/agent/human_in_the_loop/test_user_confirmation_flows.py
import pytest from agno.agent import Agent, RunOutput # noqa from agno.models.openai import OpenAIChat from agno.tools.decorator import tool def test_tool_call_requires_confirmation(shared_db): @tool(requires_confirmation=True) def get_the_weather(city: str): return f"It is currently 70 degrees and ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/integration/agent/human_in_the_loop/test_run_requirement.py
libs/agno/tests/integration/agent/human_in_the_loop/test_run_requirement.py
"""Tests for the RunRequirement class, used to handle HITL flows""" import pytest from agno.agent import Agent from agno.models.openai import OpenAIChat from agno.tools.decorator import tool def test_run_requirement_needs_confirmation_flag(shared_db): """Test that needs_confirmation flag is set correctly""" ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/integration/agent/human_in_the_loop/test_external_execution_flows.py
libs/agno/tests/integration/agent/human_in_the_loop/test_external_execution_flows.py
import pytest from agno.agent import Agent, RunOutput # noqa from agno.models.openai import OpenAIChat from agno.tools.decorator import tool def test_tool_call_requires_external_execution(shared_db): @tool(external_execution=True) def send_email(to: str, subject: str, body: str): pass agent = A...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/integration/agent/human_in_the_loop/__init__.py
libs/agno/tests/integration/agent/human_in_the_loop/__init__.py
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/integration/vector_dbs/__init__.py
libs/agno/tests/integration/vector_dbs/__init__.py
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/integration/vector_dbs/test_lancedb.py
libs/agno/tests/integration/vector_dbs/test_lancedb.py
import asyncio import logging from typing import Dict, List, Optional, Tuple import pytest from agno.knowledge.document.base import Document from agno.knowledge.embedder.base import Embedder from agno.utils.log import logger from agno.vectordb.lancedb.lance_db import LanceDb # Set logging level to DEBUG logger.setLe...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/response.py
libs/agno/tests/unit/response.py
import json import time from agno.models.message import Message, Metrics from agno.models.response import ToolExecution from agno.run.agent import RunOutput def test_timer_serialization(): message_1 = Message(role="user", content="Hello, world!") message_2 = Message(role="assistant", metrics=Metrics()) ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/__init__.py
libs/agno/tests/unit/__init__.py
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/test_filters.py
libs/agno/tests/unit/test_filters.py
"""Unit tests for search filter expressions. Tests cover: - Basic filter operators (EQ, IN, GT, LT) - Logical operators (AND, OR, NOT) - Operator overloading (&, |, ~) - Serialization (to_dict) - Deserialization (from_dict) - Complex nested expressions - Edge cases """ import pytest from agno.filters import AND, EQ,...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/vectordb/test_qdrantdb.py
libs/agno/tests/unit/vectordb/test_qdrantdb.py
from typing import List from unittest.mock import Mock, patch import pytest from agno.knowledge.document import Document from agno.vectordb.qdrant import Qdrant @pytest.fixture def mock_qdrant_client(): """Fixture to create a mock Qdrant client""" with patch("qdrant_client.QdrantClient") as mock_client_clas...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/vectordb/test_singlestore.py
libs/agno/tests/unit/vectordb/test_singlestore.py
import json from typing import List from unittest.mock import MagicMock, patch import pytest from sqlalchemy.engine import Engine from agno.knowledge.document import Document from agno.vectordb.distance import Distance from agno.vectordb.singlestore import SingleStore TEST_COLLECTION = "test_collection" TEST_SCHEMA ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/vectordb/test_milvusdb.py
libs/agno/tests/unit/vectordb/test_milvusdb.py
from typing import List from unittest.mock import Mock, patch import pytest from agno.knowledge.document import Document from agno.utils.log import log_debug from agno.vectordb.distance import Distance # Ensure Milvus is available and usable in the current environment. # This handles some CI errors when running Milv...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/vectordb/test_clickhousedb.py
libs/agno/tests/unit/vectordb/test_clickhousedb.py
import uuid from unittest.mock import AsyncMock, MagicMock, patch import pytest from agno.knowledge.document import Document from agno.vectordb.clickhouse import Clickhouse # Configuration for tests TEST_TABLE = f"test_clickhouse_{uuid.uuid4().hex[:8]}" TEST_DB = "test_db" @pytest.fixture def mock_client(): ""...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/vectordb/test_upstashdb.py
libs/agno/tests/unit/vectordb/test_upstashdb.py
import os from typing import List from unittest.mock import MagicMock, Mock, patch import pytest from agno.knowledge.document import Document from agno.vectordb.upstashdb import UpstashVectorDb @pytest.fixture def mock_embedder(): """Fixture to create a mock embedder""" embedder = MagicMock() embedder.d...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/vectordb/test_cassandra.py
libs/agno/tests/unit/vectordb/test_cassandra.py
import uuid from unittest.mock import MagicMock, patch import pytest from cassandra.cluster import Session from agno.knowledge.document import Document from agno.vectordb.cassandra import Cassandra from agno.vectordb.cassandra.index import AgnoMetadataVectorCassandraTable @pytest.fixture def mock_session(): """...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/vectordb/test_redisdb.py
libs/agno/tests/unit/vectordb/test_redisdb.py
import sys import types from typing import Any, Dict, List from unittest.mock import MagicMock import pytest from agno.knowledge.document import Document from agno.vectordb.search import SearchType @pytest.fixture() def stub_redisvl(monkeypatch): """Patch installed redis/redisvl to avoid real network and return...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/vectordb/conftest.py
libs/agno/tests/unit/vectordb/conftest.py
from typing import Any, Dict, List from unittest.mock import MagicMock import pytest @pytest.fixture(scope="session") def mock_embedder(): """Create a mock embedder with appropriate return values.""" mock = MagicMock() # Mock dimensions property mock.dimensions = 1024 # Create a fixed embedding...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/vectordb/test_mongodb.py
libs/agno/tests/unit/vectordb/test_mongodb.py
import uuid from hashlib import md5 from typing import Any, Dict, Generator, List, Optional from unittest.mock import AsyncMock, MagicMock, patch import pytest from pymongo import MongoClient from pymongo.collection import Collection from pymongo.database import Database from agno.knowledge.document import Document f...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/vectordb/test_weaviatedb.py
libs/agno/tests/unit/vectordb/test_weaviatedb.py
import json import uuid from typing import List from unittest.mock import MagicMock, Mock, patch import pytest from agno.knowledge.document import Document from agno.vectordb.search import SearchType from agno.vectordb.weaviate import Weaviate from agno.vectordb.weaviate.index import Distance, VectorIndex @pytest.f...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/vectordb/test_chromadb.py
libs/agno/tests/unit/vectordb/test_chromadb.py
import os import shutil from typing import List from unittest.mock import MagicMock, patch import pytest from agno.knowledge.document import Document from agno.vectordb.chroma import ChromaDb from agno.vectordb.chroma.chromadb import reciprocal_rank_fusion from agno.vectordb.distance import Distance from agno.vectord...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
true
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/vectordb/__init__.py
libs/agno/tests/unit/vectordb/__init__.py
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/vectordb/test_couchbase.py
libs/agno/tests/unit/vectordb/test_couchbase.py
import copy from unittest.mock import AsyncMock, Mock, patch import pytest from acouchbase.bucket import AsyncBucket from acouchbase.cluster import AsyncCluster from acouchbase.collection import AsyncCollection from acouchbase.scope import AsyncScope from couchbase.auth import PasswordAuthenticator from couchbase.buck...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
true
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/vectordb/test_pineconedb.py
libs/agno/tests/unit/vectordb/test_pineconedb.py
import uuid from unittest.mock import AsyncMock, MagicMock, patch import pytest from agno.knowledge.document import Document from agno.vectordb.pineconedb import PineconeDb # Configuration for tests TEST_INDEX_NAME = f"test_index_{uuid.uuid4().hex[:8]}" TEST_DIMENSION = 1024 TEST_NAMESPACE = "test_namespace" @pyte...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/vectordb/test_lancedb.py
libs/agno/tests/unit/vectordb/test_lancedb.py
import os import shutil from typing import List import pytest from agno.knowledge.document import Document from agno.vectordb.lancedb import LanceDb from agno.vectordb.search import SearchType TEST_TABLE = "test_table" TEST_PATH = "tmp/test_lancedb" @pytest.fixture def lance_db(mock_embedder): """Fixture to cr...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/vectordb/test_pgvector.py
libs/agno/tests/unit/vectordb/test_pgvector.py
import uuid from unittest.mock import MagicMock, patch import pytest from sqlalchemy.engine import URL, Engine from sqlalchemy.orm import Session from agno.knowledge.document import Document from agno.vectordb.pgvector import PgVector from agno.vectordb.search import SearchType # Configuration for tests TEST_TABLE =...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/vectordb/test_surrealdb.py
libs/agno/tests/unit/vectordb/test_surrealdb.py
from typing import Generator, List from unittest.mock import AsyncMock, MagicMock, patch import pytest from agno.knowledge.document import Document from agno.vectordb.surrealdb import SurrealDb try: from surrealdb import Surreal except ImportError: raise ImportError("surrealdb is not installed") @pytest.fi...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_tavily.py
libs/agno/tests/unit/tools/test_tavily.py
"""Unit tests for TavilyTools class.""" import os from unittest.mock import Mock, patch import pytest from tavily import TavilyClient # noqa from agno.tools.tavily import TavilyTools TEST_API_KEY = os.environ.get("TAVILY_API_KEY", "test_api_key") @pytest.fixture def mock_tavily_client(): """Create a mock Tav...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_googlesheets_tools.py
libs/agno/tests/unit/tools/test_googlesheets_tools.py
"""Unit tests for GoogleSheetsTools class.""" import json from unittest.mock import MagicMock, Mock, patch import pytest from google.oauth2.credentials import Credentials from agno.tools.googlesheets import GoogleSheetsTools @pytest.fixture def mock_credentials(): """Mock Google OAuth2 credentials.""" mock...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_visualization.py
libs/agno/tests/unit/tools/test_visualization.py
"""Unit tests for VisualizationTools class.""" import json import os import tempfile from unittest.mock import patch import pytest from agno.tools.visualization import VisualizationTools @pytest.fixture def temp_output_dir(): """Create a temporary directory for test outputs.""" with tempfile.TemporaryDirec...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_postgres.py
libs/agno/tests/unit/tools/test_postgres.py
from unittest.mock import Mock, mock_open, patch import psycopg import pytest from agno.tools.postgres import PostgresTools # --- Mock Data for Tests --- MOCK_TABLES_RESULT = [{"table_name": "employees"}, {"table_name": "departments"}, {"table_name": "projects"}] MOCK_DESCRIBE_RESULT = [ {"column_name": "id", "...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_todoist_tools.py
libs/agno/tests/unit/tools/test_todoist_tools.py
"""Unit tests for TodoistTools class.""" import json from unittest.mock import Mock, patch import pytest # Check if todoist_api_python can be imported without errors # The library may be installed but have broken dependencies (dataclass_wizard) try: import todoist_api_python.api # noqa: F401 TODOIST_AVAILA...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_opencv.py
libs/agno/tests/unit/tools/test_opencv.py
"""Unit tests for OpenCVTools class.""" from unittest.mock import Mock, patch import numpy as np import pytest from agno.agent import Agent from agno.media import Image, Video from agno.tools.function import ToolResult from agno.tools.opencv import OpenCVTools @pytest.fixture def mock_cv2(): """Create a mock O...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_webex.py
libs/agno/tests/unit/tools/test_webex.py
"""Unit tests for WebexTools class.""" import json from unittest.mock import Mock, patch import pytest from requests import Response from webexpythonsdk import WebexAPI from webexpythonsdk.exceptions import RateLimitError from agno.tools.webex import WebexTools @pytest.fixture def mock_webex_api(): """Create a...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_google_bigquery.py
libs/agno/tests/unit/tools/test_google_bigquery.py
# agno/tests/unit/tools/test_bigquery.py import json from unittest.mock import MagicMock, patch import pytest from agno.tools.google_bigquery import GoogleBigQueryTools @pytest.fixture def mock_bq_client(): """Mock BigQuery Client used by BQTools.""" with patch("agno.tools.google_bigquery.bigquery.Client",...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_toolkit.py
libs/agno/tests/unit/tools/test_toolkit.py
"""Unit tests for Toolkit class.""" import pytest from agno.tools import Toolkit, tool from agno.tools.function import Function def example_func(a: int, b: int) -> int: """Example function for testing.""" return a + b def another_func(x: str) -> str: """Another example function for testing.""" ret...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_gmail_tools.py
libs/agno/tests/unit/tools/test_gmail_tools.py
"""Unit tests for GmailTools class.""" import base64 from datetime import datetime from typing import Any, Dict from unittest.mock import MagicMock, Mock, mock_open, patch import pytest from google.oauth2.credentials import Credentials from googleapiclient.errors import HttpError from agno.tools.gmail import GmailTo...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
true
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_neo4j.py
libs/agno/tests/unit/tools/test_neo4j.py
import os from unittest.mock import MagicMock, patch import pytest from agno.tools.neo4j import Neo4jTools def test_list_labels(): with patch("neo4j.GraphDatabase.driver") as mock_driver: mock_session = mock_driver.return_value.session.return_value # Patch the context manager's __enter__ to retu...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_mem0.py
libs/agno/tests/unit/tools/test_mem0.py
import json from unittest.mock import MagicMock import pytest from agno.tools.mem0 import Mem0Tools MockMemory = MagicMock() MockMemoryClient = MagicMock() @pytest.fixture(scope="function") def mock_memory_instance(): mock = MockMemory() mock.reset_mock() mock.add.return_value = {"results": [{"id": "me...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_financial_datasets.py
libs/agno/tests/unit/tools/test_financial_datasets.py
import os from unittest.mock import MagicMock, patch import pytest from agno.tools.financial_datasets import FinancialDatasetsTools @pytest.fixture def api_key(): """Fixture for test API key.""" return "test_api_key" @pytest.fixture def financial_tools(api_key): """Fixture for FinancialDatasetsTools i...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_aws_ses.py
libs/agno/tests/unit/tools/test_aws_ses.py
"""Unit tests for AWS SES Tool""" from unittest.mock import Mock, patch import pytest from botocore.exceptions import ClientError from agno.tools.aws_ses import AWSSESTool class TestAWSSESTool: """Test cases for AWSSESTool""" @patch("boto3.client") def test_initialization_default_region(self, mock_bot...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_confluence.py
libs/agno/tests/unit/tools/test_confluence.py
"""Unit tests for ConfluenceTools class.""" import json from unittest.mock import MagicMock, patch import pytest from atlassian import Confluence from agno.tools.confluence import ConfluenceTools @pytest.fixture def mock_confluence(): """Create a mock Confluence client.""" with patch("agno.tools.confluence...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_mcp.py
libs/agno/tests/unit/tools/test_mcp.py
from unittest.mock import AsyncMock, patch import pytest from agno.tools.mcp import MCPTools, MultiMCPTools @pytest.mark.asyncio async def test_sse_transport_without_url_nor_sse_client_params(): """Test that ValueError is raised when transport is SSE but URL is not provided.""" with pytest.raises(ValueError...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_functions.py
libs/agno/tests/unit/tools/test_functions.py
from typing import Any, Callable, Dict import pytest from pydantic import ValidationError from agno.tools.decorator import tool from agno.tools.function import Function, FunctionCall def test_function_initialization(): """Test basic Function initialization with required and optional parameters.""" # Test wi...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_serper.py
libs/agno/tests/unit/tools/test_serper.py
import json from unittest.mock import Mock, patch import pytest import requests from agno.tools.serper import SerperTools @pytest.fixture(autouse=True) def clear_env(monkeypatch): """Ensure SERPER_API_KEY is unset unless explicitly needed.""" monkeypatch.delenv("SERPER_API_KEY", raising=False) @pytest.fix...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_parallel_tools.py
libs/agno/tests/unit/tools/test_parallel_tools.py
"""Unit tests for ParallelTools""" import json from unittest.mock import Mock, patch import pytest from agno.tools.parallel import ParallelTools @pytest.fixture def mock_parallel_client(): """Mock Parallel client.""" with patch("agno.tools.parallel.ParallelClient") as mock_client: yield mock_client...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_openweather.py
libs/agno/tests/unit/tools/test_openweather.py
"""Unit tests for OpenWeatherTools class.""" import json from unittest.mock import Mock, patch import pytest from agno.tools.openweather import OpenWeatherTools @pytest.fixture def mock_openweather_api(): """Create a mock OpenWeatherMap API client.""" with patch("agno.tools.openweather.requests.get") as mo...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_notion.py
libs/agno/tests/unit/tools/test_notion.py
import json from unittest.mock import Mock, patch import pytest from agno.tools.notion import NotionTools @pytest.fixture(autouse=True) def clear_env(monkeypatch): """Ensure NOTION_API_KEY and NOTION_DATABASE_ID are unset unless explicitly needed.""" monkeypatch.delenv("NOTION_API_KEY", raising=False) m...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_calculator.py
libs/agno/tests/unit/tools/test_calculator.py
"""Unit tests for CalculatorTools class.""" import json from unittest.mock import patch import pytest from agno.tools.calculator import CalculatorTools @pytest.fixture def calculator_tools(): """Create a CalculatorTools instance with all operations enabled.""" return CalculatorTools() @pytest.fixture def...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_hackernews.py
libs/agno/tests/unit/tools/test_hackernews.py
"""Unit tests for HackerNewsTools class.""" import json from unittest.mock import MagicMock, patch import pytest from agno.tools.hackernews import HackerNewsTools @pytest.fixture def hackernews_tools(): """Create a HackerNewsTools instance with all tools enabled.""" return HackerNewsTools() @pytest.fixtu...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_webbrowser.py
libs/agno/tests/unit/tools/test_webbrowser.py
"""Unit tests for WebBrowserTools class.""" from unittest.mock import patch import pytest from agno.tools.webbrowser import WebBrowserTools @pytest.fixture def webbrowser_tools(): """Create a WebBrowserTools instance.""" return WebBrowserTools() def test_initialization(webbrowser_tools): """Test init...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_github.py
libs/agno/tests/unit/tools/test_github.py
"""Unit tests for GitHub tools.""" import json from datetime import datetime from unittest.mock import MagicMock, patch import pytest from github import Github from github.GithubException import GithubException from github.Issue import Issue from github.PullRequest import PullRequest from github.Repository import Rep...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
true
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_google_maps.py
libs/agno/tests/unit/tools/test_google_maps.py
"""Unit tests for Google Maps tools.""" import json from datetime import datetime from unittest.mock import MagicMock, patch import pytest from agno.tools.google_maps import GoogleMapTools # Mock responses MOCK_PLACES_RESPONSE = { "results": [ { "name": "Test Business", "formatte...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_searxng.py
libs/agno/tests/unit/tools/test_searxng.py
"""Unit tests for Searxng class.""" import json from unittest.mock import Mock, patch import pytest from agno.tools.searxng import Searxng @pytest.fixture def searxng_instance(): """Create a Searxng instance.""" return Searxng(host="http://localhost:53153") @pytest.fixture def searxng_with_engines(): ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_browserbase.py
libs/agno/tests/unit/tools/test_browserbase.py
"""Unit tests for BrowserbaseTools class.""" import json import os from unittest.mock import MagicMock, Mock, patch import pytest from playwright.sync_api import Browser, BrowserContext, Page from agno.tools.browserbase import BrowserbaseTools TEST_API_KEY = os.environ.get("BROWSERBASE_API_KEY", "test_api_key") TES...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_decorator.py
libs/agno/tests/unit/tools/test_decorator.py
import asyncio from typing import AsyncIterator, Generator import pytest from agno.tools.decorator import tool from agno.tools.function import Function def test_sync_function_decorator(): @tool def sync_function(x: int) -> int: """Test sync function""" return x * 2 assert isinstance(syn...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_pandas.py
libs/agno/tests/unit/tools/test_pandas.py
import pandas as pd import pytest from agno.tools.pandas import PandasTools @pytest.fixture def pandas_tools(): return PandasTools() def test_pandas_tools_initialization(): tools = PandasTools() assert len(tools.tools) == 2 assert tools.name == "pandas_tools" assert isinstance(tools.dataframes,...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_agentql.py
libs/agno/tests/unit/tools/test_agentql.py
"""Unit tests for AgentQLTools class.""" from unittest.mock import Mock, patch import pytest from agno.tools.agentql import AgentQLTools @pytest.fixture def mock_playwright(): """Create a mock Playwright instance.""" with patch("agno.tools.agentql.sync_playwright") as mock_pw: mock_browser = Mock()...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_cartesia.py
libs/agno/tests/unit/tools/test_cartesia.py
"""Unit tests for Cartesia tools.""" import json # import logging # Removed unused import from unittest.mock import MagicMock, patch # Removed unused mock_open import pytest from agno.agent import Agent # Added for TTS test from agno.media import Audio from agno.tools.cartesia import CartesiaTools from agno.tools...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_firecrawl.py
libs/agno/tests/unit/tools/test_firecrawl.py
import json import os from unittest.mock import Mock, patch import pytest from firecrawl import FirecrawlApp # noqa from agno.tools.firecrawl import FirecrawlTools TEST_API_KEY = os.environ.get("FIRECRAWL_API_KEY", "test_api_key") TEST_API_URL = "https://api.firecrawl.dev" @pytest.fixture def mock_firecrawl(): ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_exa.py
libs/agno/tests/unit/tools/test_exa.py
"""Unit tests for ExaTools class.""" import json from unittest.mock import Mock, patch import pytest from exa_py import Exa from exa_py.api import SearchResponse from agno.tools.exa import ExaTools @pytest.fixture def mock_exa_client(): """Create a mock Exa API client.""" with patch("agno.tools.exa.Exa") a...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_brave_search.py
libs/agno/tests/unit/tools/test_brave_search.py
import json import os from unittest.mock import MagicMock, patch import pytest from agno.tools.bravesearch import BraveSearchTools @pytest.fixture def mock_brave_client(): with patch("agno.tools.bravesearch.Brave") as mock_brave: # Create a mock instance that will be returned when Brave() is called ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_e2b.py
libs/agno/tests/unit/tools/test_e2b.py
"""Unit tests for E2BTools class.""" import os import sys from unittest.mock import Mock, patch import pytest from agno.agent import Agent from agno.media import Image from agno.tools.function import ToolResult # Mock the e2b_code_interpreter module before importing E2BTools with patch.dict("sys.modules", {"e2b_cod...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_brightdata.py
libs/agno/tests/unit/tools/test_brightdata.py
"""Unit tests for BrightDataTools class.""" import base64 import json from unittest.mock import Mock, patch import pytest import requests from agno.agent import Agent from agno.media import Image from agno.tools.brightdata import BrightDataTools from agno.tools.function import ToolResult @pytest.fixture def mock_a...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_filetools.py
libs/agno/tests/unit/tools/test_filetools.py
import json import tempfile from pathlib import Path from agno.tools.file import FileTools def test_save_and_read_file(): """Test saving and reading a file.""" with tempfile.TemporaryDirectory() as tmp_dir: base_dir = Path(tmp_dir) file_tools = FileTools(base_dir=base_dir) # Save a f...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_scrapegraph.py
libs/agno/tests/unit/tools/test_scrapegraph.py
"""Unit tests for ScrapeGraphTools class.""" import json import os from unittest.mock import Mock, patch import pytest from agno.tools.scrapegraph import ScrapeGraphTools @pytest.fixture def mock_scrapegraph_client(): """Create a mock ScrapeGraph client.""" mock_client = Mock() # Simple mock responses...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/__init__.py
libs/agno/tests/unit/tools/__init__.py
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_oxylabs.py
libs/agno/tests/unit/tools/test_oxylabs.py
"""Unit tests for OxylabsTools class.""" import json from unittest.mock import Mock, patch import pytest from agno.agent import Agent from agno.tools.oxylabs import OxylabsTools @pytest.fixture def mock_agent(): """Create a mock Agent instance.""" return Mock(spec=Agent) @pytest.fixture def mock_oxylabs_...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_evm.py
libs/agno/tests/unit/tools/test_evm.py
"""Unit tests for EvmTools class.""" from unittest.mock import Mock, patch import pytest from agno.tools.evm import EvmTools @pytest.fixture def mock_web3_client(): """Create a mocked Web3 client with all required methods.""" mock_client = Mock() # Mock Web3 conversion methods mock_client.to_wei =...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_duckdb.py
libs/agno/tests/unit/tools/test_duckdb.py
from unittest.mock import MagicMock, patch import pytest from agno.tools.duckdb import DuckDbTools @pytest.fixture def mock_duckdb_connection(): """Mock DuckDB connection used by DuckDbTools.""" with patch("agno.tools.duckdb.duckdb") as mock_duckdb: mock_connection = MagicMock() mock_duckdb....
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_redshift.py
libs/agno/tests/unit/tools/test_redshift.py
from unittest.mock import Mock, mock_open, patch import pytest try: import redshift_connector except ImportError: raise ImportError("`redshift_connector` not installed. Please install using `pip install redshift-connector`.") from agno.tools.redshift import RedshiftTools # --- Mock Data for Tests --- MOCK_T...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_zoom_tools.py
libs/agno/tests/unit/tools/test_zoom_tools.py
"""Unit tests for ZoomTools class.""" import json from datetime import datetime, timedelta from unittest.mock import MagicMock, patch import pytest import requests from agno.tools.zoom import ZoomTools @pytest.fixture def zoom_tools(): """Create a ZoomTools instance with mock credentials""" return ZoomTool...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_bitbucket.py
libs/agno/tests/unit/tools/test_bitbucket.py
import json import os from unittest.mock import MagicMock, patch import pytest import requests from agno.tools.bitbucket import BitbucketTools class TestBitbucketTools: """Test suite for BitbucketTools class.""" @pytest.fixture def mock_env_vars(self): """Mock environment variables for testing....
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_custom_api.py
libs/agno/tests/unit/tools/test_custom_api.py
"""Unit tests for CustomApiTools class.""" import json from unittest.mock import Mock, patch import pytest import requests from agno.tools.api import CustomApiTools @pytest.fixture def api_tools(): """Create a CustomApiTools instance with test configuration.""" return CustomApiTools( base_url="http...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_crawl4ai.py
libs/agno/tests/unit/tools/test_crawl4ai.py
"""Unit tests for Crawl4aiTools class.""" from unittest.mock import AsyncMock, MagicMock, patch import pytest from agno.tools.crawl4ai import Crawl4aiTools @pytest.fixture def mock_async_crawler(): """Create a mock AsyncWebCrawler.""" with patch("agno.tools.crawl4ai.AsyncWebCrawler") as mock_crawler: ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_google_calendar.py
libs/agno/tests/unit/tools/test_google_calendar.py
"""Unit tests for Google Calendar Tools.""" import json import os import tempfile from unittest.mock import MagicMock, Mock, patch import pytest from google.oauth2.credentials import Credentials from agno.tools.googlecalendar import GoogleCalendarTools @pytest.fixture def mock_credentials(): """Mock Google OAu...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_webtools.py
libs/agno/tests/unit/tools/test_webtools.py
"""Unit tests for WebTools class.""" from unittest.mock import Mock, patch import pytest from agno.tools.webtools import WebTools @pytest.fixture def web_tools(): """Fixture to create a WebTools instance.""" return WebTools(retries=3) def test_expand_url_success(web_tools): """Test successful expansi...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_python_tools.py
libs/agno/tests/unit/tools/test_python_tools.py
import tempfile from pathlib import Path from unittest.mock import patch import pytest from agno.tools.python import PythonTools @pytest.fixture def temp_dir(): with tempfile.TemporaryDirectory() as tmpdirname: yield Path(tmpdirname) @pytest.fixture def python_tools(temp_dir): return PythonTools( ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_shopify.py
libs/agno/tests/unit/tools/test_shopify.py
"""Unit tests for ShopifyTools class.""" import json from unittest.mock import MagicMock, patch import pytest from agno.tools.shopify import ShopifyTools @pytest.fixture def mock_httpx_client(): """Create a mock httpx client.""" with patch("agno.tools.shopify.httpx.Client") as mock_client: mock_ins...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_google_drive.py
libs/agno/tests/unit/tools/test_google_drive.py
from unittest.mock import MagicMock, patch import pytest from google.oauth2.credentials import Credentials from agno.tools.google_drive import GoogleDriveTools @pytest.fixture def mock_service(): service = MagicMock() files = service.files.return_value files.list.return_value.execute.return_value = { ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_zep.py
libs/agno/tests/unit/tools/test_zep.py
from unittest.mock import AsyncMock, Mock, patch import pytest from agno.tools.zep import ZepAsyncTools, ZepTools # Test data MOCK_API_KEY = "test_api_key" MOCK_SESSION_ID = "test-session" MOCK_USER_ID = "test-user" @pytest.fixture def mock_zep(): with patch("agno.tools.zep.Zep") as mock: yield mock ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_daytona.py
libs/agno/tests/unit/tools/test_daytona.py
"""Test DaytonaTools functionality.""" import sys from unittest.mock import MagicMock, patch import pytest # Create a proper mock Configuration class that can be patched class MockConfiguration: def __init__(self, *args, **kwargs): self.verify_ssl = True # Mock the daytona modules before importing Day...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_jina.py
libs/agno/tests/unit/tools/test_jina.py
import os from unittest.mock import MagicMock, patch import httpx import pytest from agno.tools.jina import JinaReaderTools, JinaReaderToolsConfig @pytest.fixture() def jina_tools(): os.environ["JINA_API_KEY"] = "test_api_key" return JinaReaderTools() @pytest.fixture def sample_read_url_response(): ""...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_trafilatura.py
libs/agno/tests/unit/tools/test_trafilatura.py
import json from unittest.mock import Mock, patch import pytest from agno.tools.trafilatura import TrafilaturaTools @pytest.fixture def mock_trafilatura_modules(): """Mock all trafilatura module imports.""" with ( patch("agno.tools.trafilatura.extract") as mock_extract, patch("agno.tools.tra...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/test_valyu.py
libs/agno/tests/unit/tools/test_valyu.py
import json from unittest.mock import patch import pytest from agno.tools.valyu import ValyuTools class MockSearchResult: def __init__( self, title="Test Paper", url="https://example.com", content="Test content", source="test", relevance_score=0.8, descrip...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/models/test_morph.py
libs/agno/tests/unit/tools/models/test_morph.py
from unittest.mock import MagicMock, mock_open, patch import pytest from agno.tools.models.morph import MorphTools # Fixture for mock OpenAI client @pytest.fixture def mock_openai_client(): client = MagicMock() return client # Fixture for mock MorphTools with mock client @pytest.fixture def mock_morph_too...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/models/test_groq.py
libs/agno/tests/unit/tools/models/test_groq.py
# aac import os from unittest.mock import MagicMock, mock_open, patch import pytest from agno.agent import Agent from agno.media import Audio from agno.tools.function import ToolResult from agno.tools.models.groq import GroqTools MOCK_API_KEY = "test-groq-api-key" @pytest.fixture(autouse=True) def mock_groq_env_k...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/models/test_nebius.py
libs/agno/tests/unit/tools/models/test_nebius.py
import base64 from unittest.mock import MagicMock, patch from uuid import UUID import pytest from agno.agent import Agent from agno.media import Image from agno.tools.function import ToolResult from agno.tools.models.nebius import NebiusTools # Fixture for mock agent @pytest.fixture def mock_agent(): agent = Ma...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/models/test_azure_openai.py
libs/agno/tests/unit/tools/models/test_azure_openai.py
"""Unit tests for AzureOpenAITools class.""" from unittest.mock import MagicMock, patch import pytest from agno.agent import Agent from agno.media import Image from agno.tools.function import ToolResult from agno.tools.models.azure_openai import AzureOpenAITools @pytest.fixture def mock_agent(): """Create a mo...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/models/test_gemini.py
libs/agno/tests/unit/tools/models/test_gemini.py
# test from unittest.mock import MagicMock, patch from uuid import UUID import pytest from agno.agent import Agent from agno.media import Image, Video from agno.tools.function import ToolResult from agno.tools.models.gemini import GeminiTools # Fixture for mock agent @pytest.fixture def mock_agent(): agent = M...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/tools/models/__init__.py
libs/agno/tests/unit/tools/models/__init__.py
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/integrations/test_memori.py
libs/agno/tests/unit/integrations/test_memori.py
""" Unit tests for Memori integration with Agno agents. Tests the new integration pattern using Memori.agno.register(). """ import os import tempfile from unittest.mock import Mock, patch import pytest from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from agno.agent import Agent from agn...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/tests/unit/app/__init__.py
libs/agno/tests/unit/app/__init__.py
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false