test: Exchange API (Asset, Order) VCR cassette 통합 테스트 추가#42
Merged
interruping merged 3 commits intomainfrom Mar 22, 2026
Merged
test: Exchange API (Asset, Order) VCR cassette 통합 테스트 추가#42interruping merged 3 commits intomainfrom
interruping merged 3 commits intomainfrom
Conversation
- get_chance()가 list[OrderChance] 대신 OrderChance를 반환하도록 수정 (Upbit API가 단일 객체를 반환하나 리스트로 처리하고 있었음) - OrderCreated 모델에서 remaining_volume, prevented_volume, prevented_locked을 optional로 변경 (시장가 주문 응답에 해당 필드가 포함되지 않음) - 동기/비동기 양쪽 모두 수정, mock 테스트도 함께 수정 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Accounts (asset) 및 Orders API에 대한 VCR cassette 통합 테스트 추가. - tests/api/test_accounts_vcr.py: accounts.list() cassette 테스트 - tests/api/test_orders_vcr.py: 안전한 엔드포인트(get_chance, create_test, list_open, list_closed), 지정가 라이프사이클(create→get→cancel, cancel_and_new, list_by_ids, cancel_by_ids, cancel_open), 시장가 매수→매도 테스트 - scripts/record_order_cassettes.py: 시장가 매수→매도 cassette 녹화 스크립트 - tests/_vcr.py: serialize() 시 bytes body를 pretty JSON으로 변환하는 _prettify_response_bodies() 추가 (비압축 응답 대응) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
매수 금액을 5000→10000원으로 변경한 후 docstring과 예상 손실 안내가 업데이트되지 않았던 부분 수정. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #41
Depends on #40
Summary
accounts.list()cassette 녹화 및 리플레이 테스트scripts/record_order_cassettes.py— 시장가 매수→매도 cassette 녹화 (확인 프롬프트, try/finally 안전장치)_prettify_response_bodies()추가 — 비압축 응답(bytes body)도 pretty JSON으로 저장Test plan
uv run pytest tests/api/test_accounts_vcr.py tests/api/test_orders_vcr.py -v— 전체 11개 테스트 통과uv run pytest tests/api/test_quotation_vcr.py -v— 기존 quotation 테스트 영향 없음🤖 Generated with Claude Code