Skip to content

enable different response format #123#124

Open
FrenchCommando wants to merge 1 commit intojessecooper:masterfrom
FrenchCommando:order-resp-format-123
Open

enable different response format #123#124
FrenchCommando wants to merge 1 commit intojessecooper:masterfrom
FrenchCommando:order-resp-format-123

Conversation

@FrenchCommando
Copy link

Summary

  • preview_equity_order, change_preview_equity_order, place_equity_order, and place_changed_equity_order hardcoded "xml" in their perform_request calls, ignoring the resp_format kwarg passed by
    the caller
  • Replaced the hardcoded "xml" with kwargs.get("resp_format", "xml") so the parameter is properly forwarded
  • place_option_order and place_changed_option_order also inherit the fix since they delegate via **kwargs

Test plan

  • Added 4 new tests that call each fixed method with resp_format="json", mock the session to return JSON, and assert the response is parsed as JSON (not piped through xmltodict)
  • All 11 tests pass

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