generated from personal-projects/leo-claude-mktplace
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>
This commit is contained in:
59
tests/conftest.py
Normal file
59
tests/conftest.py
Normal file
@@ -0,0 +1,59 @@
|
||||
"""Pytest configuration and shared fixtures for test suite."""
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def sample_gitea_config():
|
||||
"""Provide sample Gitea configuration for tests."""
|
||||
return {
|
||||
"gitea_url": "https://gitea.test.com",
|
||||
"gitea_token": "test_token_123",
|
||||
"gitea_owner": "test_owner",
|
||||
"gitea_repo": "test_repo",
|
||||
}
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def sample_tools_list():
|
||||
"""Provide sample MCP tools list for testing."""
|
||||
return [
|
||||
{
|
||||
"name": "list_issues",
|
||||
"description": "List issues in repository",
|
||||
"inputSchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"state": {"type": "string", "enum": ["open", "closed", "all"]},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"name": "create_issue",
|
||||
"description": "Create a new issue",
|
||||
"inputSchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"title": {"type": "string"},
|
||||
"body": {"type": "string"},
|
||||
},
|
||||
"required": ["title"],
|
||||
},
|
||||
},
|
||||
{
|
||||
"name": "list_labels",
|
||||
"description": "List labels in repository",
|
||||
"inputSchema": {"type": "object", "properties": {}},
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def sample_mcp_response(sample_tools_list):
|
||||
"""Provide sample MCP list_tools response."""
|
||||
return {
|
||||
"tools": sample_tools_list,
|
||||
"meta": {
|
||||
"version": "1.0",
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user