icon-project / icon-sdk-python

ICON SDK for Python
45 stars 45 forks source link

Apply full response on SDK to support tbears #47

Closed light-src closed 5 years ago

light-src commented 5 years ago

Changed some code to apply t-bears

  1. add 'full-response' param to divide case : origin case, tbears-request case.
  2. to change function defined in http_provider, and provider, each of module's make_request function is changed.
  3. in case of 'convert', return values are divided because of its object format.
boyeon555 commented 5 years ago

Why don't you add tests when full_response is true, its return value is expected response format?

light-src commented 5 years ago

Added test cases

  1. In case of use 'full_response' parameter, only return values are changed. So, in these tests are focusing on return value. 1) In case of successful, return value's format has ['id','jsonrpc','result'] key 2) In case of error, return value's format has ['id', 'jsonrpc', 'error'] key.
  2. New tests's function name's format are [modulename_full_reponse].