-
Notifications
You must be signed in to change notification settings - Fork 1
Add end-to-end integration test for Python SDK #7
Copy link
Copy link
Open
Labels
sdkSDK implementations (Python, TypeScript, Go)SDK implementations (Python, TypeScript, Go)testingTest coverage and conformanceTest coverage and conformance
Description
Summary
The Python SDK has 29 unit tests for types and routing logic, but no end-to-end test that spins up an actual delegate and client talking over HTTP.
What to do
- Create
sdk/python/tests/test_integration.py - Implement a test delegate using
LdpDelegate - Start it on a random port (use
uvicornprogrammatically or a test fixture) - Use
LdpClientto discover, establish session, and submit a task - Verify the response includes correct output and provenance
Why this matters
Without integration tests, we can't catch issues in the HTTP layer, session handshake, or serialization between client and delegate. This is the most important test gap in the SDK.
Hints
- Look at
tests/ldp_integration.rsin the Rust crate for the pattern (it does exactly this) - Use
pytest-asynciofor async test support - Start uvicorn in a background thread or use
httpx.ASGITransportto test without a real server
Acceptance criteria
- At least 3 integration tests: discover, submit_task, trust domain rejection
- Tests pass with
pytest sdk/python/tests/test_integration.py - No external dependencies beyond what's in
pyproject.toml[dev]
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
sdkSDK implementations (Python, TypeScript, Go)SDK implementations (Python, TypeScript, Go)testingTest coverage and conformanceTest coverage and conformance