Files
gitea-platform-mcp/tests/conftest.py
T
a-limasov-ii a6162a855c test: add 106 unit + smoke tests, 93% coverage
- pytest + respx + pytest-cov added as dev dependencies
- tests/smoke/test_registration.py: verify all 66 tools registered and unique
- tests/unit/: 12 files covering every tool — HTTP method, URL, params/body, errors
- tests/config.test.json + conftest.py: zero-network test setup via GITEA_CONFIG
- CLAUDE.md: developer guide with testing philosophy, pyramid, and commands
- server/gitea_mcp.py: get_commit, list_pr_files tools added
- README.md: tool count corrected to 66
2026-06-08 09:09:44 +03:00

7 lines
275 B
Python

import os
from pathlib import Path
# Must be set at module level, before any import of server.gitea_mcp,
# so find_config() picks up the test credentials instead of the real config.json.
os.environ.setdefault("GITEA_CONFIG", str(Path(__file__).parent / "config.test.json"))