Skip to main content
Glama

YDB MCP

Official
by ydb-platform
Apache 2.0
22
  • Linux
  • Apple
conftest.py1.15 kB
"""Pytest configuration for testing YDB MCP server.""" import os from unittest.mock import AsyncMock, patch import pytest @pytest.fixture def mock_ydb_driver(): """Mock YDB driver.""" with patch("ydb.aio.Driver") as mock_driver_class: # Setup the mock driver instance mock_driver = AsyncMock() mock_driver_class.return_value = mock_driver # Mock the wait method mock_driver.wait = AsyncMock() yield mock_driver @pytest.fixture def mock_ydb_pool(): """Mock YDB session pool.""" with patch("ydb.aio.QuerySessionPool") as mock_pool_class: # Setup the mock pool instance mock_pool = AsyncMock() mock_pool_class.return_value = mock_pool # Mock the execute_with_retries method mock_pool.execute_with_retries = AsyncMock() yield mock_pool @pytest.fixture def mock_env_vars(): """Mock environment variables.""" env_vars = { "YDB_ENDPOINT": "mock-endpoint", "YDB_DATABASE": "mock-database", "YDB_ANONYMOUS_CREDENTIALS": "1", } with patch.dict(os.environ, env_vars): yield env_vars

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ydb-platform/ydb-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server