Test Mapping - Source Code β TestsΒΆ
Complete mapping of source files to unit and integration tests
Last updated: 2026-01-29 Version: 0.1.1 Status: Updated to reflect existing tests in
tests/unit/
π Table of ContentsΒΆ
π Executive SummaryΒΆ
Current Test StatusΒΆ
Category |
Total Files |
With Unit Tests |
With Int Tests |
Unit Coverage |
Int Coverage |
|---|---|---|---|---|---|
CLIENT |
5 |
4/5 (80%) |
0/5 (0%) |
β High (Files) |
0% |
HTTP |
4 |
4/4 (100%) |
0/4 (0%) |
β High (Files) |
0% |
TRANSPORT |
3 |
3/3 (100%) |
0/3 (0%) |
β High (Files) |
0% |
UTILS |
4 |
4/4 (100%) |
0/4 (0%) |
β High (Files) |
0% |
CORE |
2 |
2/2 (100%) |
0/2 (0%) |
100% |
0% |
TOTAL |
18 |
17/18 (94% files) |
0/18 (0%) |
~90% (Est.) |
0% |
Note: β94% filesβ = percentage of files that have a dedicated test file. Actual line coverage needs verification via pytest --cov.
β οΈ Status: Unit tests are largely implemented. Focus shifts to Integration Tests and the missing test_auth.py.
π― Organization PrincipleΒΆ
We follow ADR-014: Test Structure Organization:
1:1 Mapping RuleΒΆ
Each source file must have:
A corresponding unit test file (Mostly complete!)
At least one integration test using it in real context (Pending)
Directory StructureΒΆ
src/reqivo/ tests/
βββ client/ βββ unit/
β βββ session.py βββββββββΊβ βββ test_session.py β
β βββ request.py βββββββββΊβ βββ test_request.py β
β βββ response.py βββββββββΊβ βββ test_response.py β
β βββ websocket.py βββββββββΊβ βββ test_websocket.py β
β βββ auth.py βββββββββΊβ βββ (MISSING) β
β β
βββ http/ β
β βββ http11.py βββββββββΊβ βββ test_http_parser.py β
β βββ headers.py βββββββββΊβ βββ test_headers.py β
β βββ body.py βββββββββΊβ βββ test_body.py β
β βββ url.py βββββββββΊβ βββ test_url.py β
β β
βββ transport/ β
β βββ connection.py βββββββββΊβ βββ test_connection.py β
β βββ connection_pool.py ββββββΊβ βββ test_connection_pool.py β
β βββ tls.py βββββββββΊβ βββ test_tls.py β
β β
βββ utils/ β
β βββ timing.py βββββββββΊβ βββ test_timing.py β
β βββ validators.py βββββββββΊβ βββ test_utils.py (Combined) β
β βββ websocket_utils.py ββββββΊβ βββ test_websocket_utils.py β
β βββ serialization.py ββββββββΊβ βββ test_utils.py (Combined) β
β β
βββ exceptions.py βββββββββΊβ βββ test_exceptions.py β
βββ version.py βββββββββΊβ βββ test_version.py β
β
βββ integration/
β βββ test_placeholder.py β οΈ (Need real tests)
β
βββ utils/
βββ (Helpers to be documented)
πΊοΈ Complete MappingΒΆ
1. CLIENT LAYER (src/reqivo/client/)ΒΆ
1.1 session.pyΒΆ
Source: src/reqivo/client/session.py
Unit Tests: β
EXISTING β tests/unit/test_session.py
Status: Implemented. Needs coverage verification.
1.2 request.pyΒΆ
Source: src/reqivo/client/request.py
Unit Tests: β
EXISTING β tests/unit/test_request.py
Status: Implemented.
1.3 response.pyΒΆ
Source: src/reqivo/client/response.py
Unit Tests: β
EXISTING β tests/unit/test_response.py
Status: Implemented.
1.4 websocket.pyΒΆ
Source: src/reqivo/client/websocket.py
Unit Tests: β
EXISTING β tests/unit/test_websocket.py
Status: Implemented.
1.5 auth.pyΒΆ
Source: src/reqivo/client/auth.py
Unit Tests: β PENDING β tests/unit/test_auth.py
Status: Missng. High Priority for next steps.
2. HTTP LAYER (src/reqivo/http/)ΒΆ
2.1 http11.pyΒΆ
Source: src/reqivo/http/http11.py
Unit Tests: β
EXISTING β tests/unit/test_http_parser.py
Status: Implemented.
2.2 headers.pyΒΆ
Source: src/reqivo/http/headers.py
Unit Tests: β
EXISTING β tests/unit/test_headers.py
Status: Implemented.
2.3 body.pyΒΆ
Source: src/reqivo/http/body.py
Unit Tests: β
EXISTING β tests/unit/test_body.py
Status: Implemented.
2.4 url.pyΒΆ
Source: src/reqivo/http/url.py
Unit Tests: β
EXISTING β tests/unit/test_url.py
Status: Implemented.
3. TRANSPORT LAYER (src/reqivo/transport/)ΒΆ
3.1 connection.pyΒΆ
Source: src/reqivo/transport/connection.py
Unit Tests: β
EXISTING β tests/unit/test_connection.py
Status: Implemented.
3.2 connection_pool.pyΒΆ
Source: src/reqivo/transport/connection_pool.py
Unit Tests: β
EXISTING β tests/unit/test_connection_pool.py
Status: Implemented.
3.3 tls.pyΒΆ
Source: src/reqivo/transport/tls.py
Unit Tests: β
EXISTING β tests/unit/test_tls.py
Status: Implemented.
4. UTILS LAYER (src/reqivo/utils/)ΒΆ
4.1-4.4 UtilsΒΆ
timing.py: β
tests/unit/test_timing.pyvalidators.py: β
tests/unit/test_utils.py(Functional tests)websocket_utils.py: β
tests/unit/test_websocket_utils.pyserialization.py: β
tests/unit/test_utils.py(Functional tests)
5. CORE MODULESΒΆ
exceptions.py: β
tests/unit/test_exceptions.pyversion.py: β
tests/unit/test_version.py
π Coverage StatusΒΆ
Coverage by ModuleΒΆ
Module |
Unit Tests |
Status |
|---|---|---|
client/session.py |
β
|
β OK |
client/request.py |
β
|
β OK |
client/response.py |
β
|
β OK |
client/websocket.py |
β
|
β OK |
client/auth.py |
β Missing |
π΄ PENDING |
http/http11.py |
β
|
β OK |
http/ other* |
β Individual tests |
β OK |
transport/connection |
β
|
β OK |
transport/pool |
β
|
β OK |
transport/tls |
β
|
β OK |
Pending Tests PrioritizationΒΆ
π₯ HIGH PRIORITY (Critical)ΒΆ
client/auth.py - Missing Unit Tests.
Integration Tests - All missing. Need to create real flows.
πΈ MEDIUM PRIORITYΒΆ
Verify Coverage - Run
pytest --covto ensure 97% is met in these existing files.
π Pending TestsΒΆ
Pending Unit TestsΒΆ
tests/unit/test_auth.py β π₯ PRIORITY 1 (Missing)
Pending Integration TestsΒΆ
# Still required to prove components work together
tests/integration/test_http_flow.py
tests/integration/test_session_flow.py
tests/integration/test_websocket_flow.py
tests/integration/test_connection_pooling.py
tests/integration/test_tls_flow.py
tests/integration/test_timeout_flow.py
End of Test Mapping