Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2to3: use Request.get_data() instead of Request.data
This is the right thing to do according to pallets/flask#716. — data is intentionally the undecoded bytes, and we need to either decode it outselves, our use .get_data(as_text=True). This latter seems to be a nicer option. I used temporary 'data' variable to assign the decoded text. .get_data() is caching by default, so this doesn't save much work, but avoid the fairly verbose method invocation in asserts. In some places 'data' was used for .post(), and this is renamed to 'post_data' to avoid the name clash. This makes all tests pass under python3. Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
- Loading branch information