test: improve coverage to 84.15% with 487 passing tests

Added comprehensive edge case and integration tests:
- Cache edge cases (malformed keys, invalidation)
- Metrics edge cases (server errors, empty data)
- Client error handling (auth errors, API errors)
- Logging edge cases (exception info, file output, extra fields)
- Groups endpoint extended tests (30+ error handling cases)

Test coverage improved from 82.67% (454 tests) to 84.15% (487 tests):
- +1.48% coverage increase
- +33 additional tests
- All tests passing (0 failures)

Modules at 100% coverage:
- wikijs/logging.py
- wikijs/metrics.py
- wikijs/cache/memory.py
- wikijs/exceptions.py
- wikijs/helpers.py
- wikijs/base.py models
- wikijs/page.py models

Updated pyproject.toml coverage threshold to 84% to match achieved level.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Claude
2025-10-23 17:14:31 +00:00
parent fd349d9957
commit fdce9fdb40
3 changed files with 482 additions and 1 deletions

View File

@@ -127,7 +127,7 @@ addopts = [
"--cov-report=term-missing",
"--cov-report=html",
"--cov-report=xml",
"--cov-fail-under=82",
"--cov-fail-under=84",
]
markers = [
"unit: Unit tests",