-
-
Notifications
You must be signed in to change notification settings - Fork 85
Open
Labels
good first issueGood for newcomersGood for newcomerspythonPython SDK specificPython SDK specifictestingIssues related to testsIssues related to tests
Description
Purpose / Goal
The Python SDK is currently tested primarily via integration tests against the live sidecar. We need isolated unit tests for client.py to ensure the data conversion logic (_convert_market, etc.) is robust against API changes.
Tasks
- Create
sdks/python/tests/test_converters.py. - Use
pytestand \unittest.mock` to simulate the sidecar server's JSON responses. - Assert that the data models (
UnifiedMarket,OrderBook) are correctly instantiated with the expected values.
Easy Way to Get Started
- Create a sample JSON file representing a market from the Polymarket API.
- In your test, pass this JSON to the
_convert_marketfunction inclient.py. - Check if attributes like
market.titleandmarket.yes.pricematch the JSON source.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomerspythonPython SDK specificPython SDK specifictestingIssues related to testsIssues related to tests