|
|
8d1b766947
|
test: expand coverage to 49% (+78 new tests, 175 total)
Add 78 new tests targeting high-impact uncovered modules:
- tests/test_search_advanced.py (23 tests): InvertedIndex CRUD,
search/advanced_search/suggest functions, tag/title indexing
- tests/test_indexer_advanced.py (15 tests): hooks, file CRUD,
path index, lookup, generation counter
- tests/test_modules.py (40 tests): audit, history, rate limit,
saved searches, vault settings, webhooks, share
Coverage improvements:
ratelimit.py: 80% → 100%
share.py: 24% → 97%
saved_searches: 37% → 95%
history.py: 26% → 86%
audit.py: 0% → 85%
search.py: 44% → 82%
webhooks.py: 31% → 67%
vault_settings: 31% → 69%
indexer.py: 47% → 65%
Overall: 35% → 49%
|
2026-05-27 22:32:10 -04:00 |
|
|
|
edb9e98f81
|
test: add pytest suite - 97 tests, search + indexer + auth
Create comprehensive test suite with 97 passing tests:
- tests/conftest.py: fixtures (TestClient, temp vault dirs, index setup)
- tests/test_search.py (27 tests): tokenizer, snippets, highlight,
tag filter, search API, advanced search, suggest, tags API
- tests/test_indexer.py (32 tests): frontmatter parsing, inline tags,
title extraction, scan_vault, find_file_in_index, backlinks
- tests/test_auth.py (38 tests): password hashing, JWT create/decode,
token revocation, user CRUD, login lockout, rate limiting, middleware
Also fix: lazy WeasyPrint import (graceful fallback when GTK missing),
add data/ to .gitignore (runtime files from test runs).
|
2026-05-27 22:06:27 -04:00 |
|