Skip to main content
Glama
test_base.py789 B
"""Tests for middleware base classes.""" from unittest.mock import MagicMock from scout_mcp.middleware.base import ScoutMiddleware class ConcreteMiddleware(ScoutMiddleware): """Concrete implementation for testing.""" async def on_message(self, context, call_next): return await call_next(context) def test_scout_middleware_has_logger() -> None: """ScoutMiddleware provides a logger attribute.""" middleware = ConcreteMiddleware() assert hasattr(middleware, "logger") assert middleware.logger is not None def test_scout_middleware_accepts_custom_logger() -> None: """ScoutMiddleware accepts custom logger.""" custom_logger = MagicMock() middleware = ConcreteMiddleware(logger=custom_logger) assert middleware.logger is custom_logger

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/jmagar/scout_mcp'

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