Commit Graph

3 Commits

Author SHA1 Message Date
cd8718c114 Move tests to repository root and update pytest configuration
- Move tests from src/gitea_mcp_remote/tests/ to tests/ (top-level)
- Update pytest.ini to point to new test location
- All imports already use absolute paths (gitea_mcp_remote.*)
- Tests run successfully from new location (28/30 pass, 2 pre-existing failures)

This improves project structure by following standard Python conventions
where tests live at the repository root level rather than inside the
source package.

Closes #21

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 18:08:54 -05:00
cd55d53f1b Remove incorrect standalone MCP implementation
This commit removes the incorrectly structured standalone MCP server that was built without understanding the distinction between standalone and HTTP transport modes. These files will be replaced with proper HTTP transport wrapper components.

Removed:
- src/gitea_mcp/ directory (standalone server implementation)
- tests/ directory (tests for standalone implementation)

This clears the way for implementing the correct HTTP-wrapped architecture.

Closes #9

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 16:06:17 -05:00
2230bceb51 test: add comprehensive test suite - Closes #7
Added comprehensive test coverage for all tool modules:

Test Files Created:
- tests/conftest.py: Shared fixtures for all tests
- tests/test_issues.py: Complete coverage for issue tools
- tests/test_labels.py: Complete coverage for label tools
- tests/test_milestones.py: Complete coverage for milestone tools

Test Coverage:
- Tool definition validation (schema structure)
- Handler function routing
- Successful API response formatting
- Error handling (GiteaClientError)
- Required parameter validation
- Optional parameter handling
- Mock Gitea API responses

Configuration Updates:
- Added pytest-cov>=4.0.0 to dev dependencies
- Created run_tests.sh script for easy test execution

All tests use pytest-asyncio for async functions and mock the
GiteaClient to avoid real API calls. Tests validate tool schemas,
handler routing, response formatting, and error handling.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 15:30:09 -05:00