Skip to main content
Glama
test_db.py428 B
# tests/test_db.py from sqlalchemy.orm import Session from backend.server.db import get_db def test_get_db(): # Create a generator from get_db db_generator = get_db() # Retrieve the session from the generator db_session = next(db_generator) assert isinstance(db_session, Session) # Close the session by advancing the generator try: next(db_generator) except StopIteration: pass

Latest Blog Posts

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/brunolnetto/fastapi-crud-mcp'

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