Compare HTTP responses against byte strings.
Review Request #10479 — Created March 31, 2019 and submitted — Latest diff uploaded
HttpResponse.content
is a byte string, and we have a lot of tests
comparing these against Unicode strings. In Python 2, that's not a big
deal, but Python 3 heavily distinguishes between the two.This change updates all comparisons to check only against byte strings.
Unit tests pass on Python 2.7 and 3.5-3.7 (with other in-progress
changes).
Diff Revision 2 (Latest)
orig
1
2
Commits
Files
reviewboard/accounts/tests/test_check_login_required_view_mixin.py |
---|
reviewboard/accounts/tests/test_login_required_view_mixin.py |
---|
reviewboard/accounts/tests/test_user_profile_required_view_mixin.py |
---|
reviewboard/diffviewer/tests/test_diff_renderer.py |
---|
reviewboard/reviews/tests/test_reviews_diff_fragment_view.py |
---|
reviewboard/search/tests.py |
---|
reviewboard/site/tests.py |
---|
reviewboard/webapi/tests/test_draft_patched_file.py |
---|
reviewboard/webapi/tests/test_original_file.py |
---|
reviewboard/webapi/tests/test_patched_file.py |
---|