Skip to content

test: cover sync SecureClient market order placement#140

Merged
cesarenaldi merged 1 commit into
mainfrom
dev-388-secure-client-order-test
Jul 6, 2026
Merged

test: cover sync SecureClient market order placement#140
cesarenaldi merged 1 commit into
mainfrom
dev-388-secure-client-order-test

Conversation

@cesarenaldi

@cesarenaldi cesarenaldi commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add shared deposit wallet key/address fixtures for integration tests
  • add metered sync SecureClient.create(...).place_market_order(...) coverage
  • keep the test using derived credentials so it exercises the default sync client path

Refs #136

Verification

  • uv run pytest tests/integration/test_clob_orders.py::test_sync_secure_client_create_places_market_order (skipped unless metered tests are enabled)
  • uv run ruff check tests/integration/conftest.py tests/integration/test_clob_orders.py
  • uv run ruff format --check tests/integration/conftest.py tests/integration/test_clob_orders.py
  • uv run pyright tests/integration/conftest.py tests/integration/test_clob_orders.py

Note

Low Risk
Test-only changes; the new metered test can place real orders when enabled but does not modify production SDK behavior.

Overview
Adds shared deposit_wallet_private_key and deposit_wallet_address fixtures in integration conftest, and wires deposit_wallet_client through them instead of reading env vars inline.

Adds a metered sync test test_sync_secure_client_create_places_market_order that uses SecureClient.create(...) as a context manager, lists positions, and places a live FAK market order (sell existing Yes inventory or buy minimum size), asserting an AcceptedOrder with an expected status—parallel to the existing async market-order coverage.

Reviewed by Cursor Bugbot for commit b66dd6f. Bugbot is set up for automated code reviews on this repo. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant