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"))