test: expand test coverage — only utils tested, server and client have zero tests
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 68/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- python
- Domain
- testing-qa
Research direction
Start with tests/conftest.py and tests/test_utils.py to understand the existing fixtures and style, then inspect client.py and server.py. Add tests/test_client.py for authentication, API and network errors, and tests/test_tools.py for empty-input validation using unittest.mock.patch for api_client calls. Done means the stated client.py and server.py coverage targets and acceptance criteria are met.
Written by the indexing model from the issue text.
Description
Problem
Test coverage is minimal. Only utils.py has tests. The two most critical modules — server.py (all tool functions) and client.py (API communication) — have zero test coverage.
Current test coverage
tests/
├── conftest.py # 3 fixtures
└── test_utils.py # 6 tests for utils.py only
Untested modules
| Module | Lines | Tests | Risk |
|---|---|---|---|
server.py |
800+ | 0 | HIGH — all user-facing tools |
client.py |
80 | 0 | HIGH — API auth, error handling |
const.py |
30 | 0 | LOW — just constants |
exceptions.py |
20 | 0 | LOW — just class definitions |
__main__.py |
80 | 0 | MEDIUM — config generation |
Proposed solution
Priority 1: client.py tests
# tests/test_client.py
def test_client_auth_header():
"""Verify Authorization header is set correctly."""
def test_client_handles_api_error_codes():
"""Verify status_code != 0 raises appropriate exceptions."""
def test_client_handles_auth_error_1004():
"""Verify 1004 raises MinimaxAuthError."""
def test_client_handles_network_error():
"""Verify RequestException is wrapped in MinimaxRequestError."""
Priority 2: server.py tool tests (with mocked API)
# tests/test_tools.py
def test_text_to_audio_validates_empty_text():
"""Verify empty text raises MinimaxRequestError."""
def test_generate_video_validates_empty_prompt():
"""Verify empty prompt raises MinimaxRequestError."""
def test_text_to_image_validates_empty_prompt():
"""Verify empty prompt raises MinimaxRequestError."""
Use unittest.mock.patch to mock api_client calls.
Acceptance criteria
client.pyhas tests for auth, error handling, and request methods- Tool functions have tests for input validation and error paths
- Coverage target: >60% for
client.py, >40% forserver.py
- Dominant language
- Python
- Stars
- 1.6k
- Forks
- 284
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MiniMax-AI/MiniMax-MCP
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
MiniMax-AI/MiniMax-MCP#89 · 1 comment ·
-
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
MiniMax-AI/MiniMax-MCP#88 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
MiniMax-AI/MiniMax-MCP#78 ·
-
fix(server): music_generation has inconsistent indentation — try block indented inside function body Open
Difficulty 1/5 Under an hour Newbie friendliness 88/100
MiniMax-AI/MiniMax-MCP#69 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
MiniMax-AI/MiniMax-MCP#105 · 1 comment ·
All issues in MiniMax-AI/MiniMax-MCP
Similar issues
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
simonw/sqlite-utils#872 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100