params dictionary of webtest.AppTest.post() does not support unicode values

Create issue
Issue #25 resolved
Former user created an issue

params dictionary of webtest.AppTest.post() does not support unicode values, nor does it raise encoding error. Instead, non-ascii characters are posted as ????.

Temporary solution: All values have to be manually encoded via .encode("UTF-8") and content_type set to "application/x-www-form-urlencoded; charset=UTF-8".

Comments (1)

  1. Gael Pasgrimaud

    I've added a encode_params() method.

    unicode values are now encoded if a charset is provided in the content_type

  2. Log in to comment