Fix issues caused by HttpRequest API change in Python 3
Review Request #10922 — Created Feb. 26, 2020 and submitted
Information | |
---|---|
david | |
rbintegrations | |
master | |
79c65a2... | |
Reviewers | |
rbintegrations | |
Python 3's urllib changed the request object so that instead of having a
get_data
method, there's now just adata
attribute. It turns out
that this attribute also existed in Python 2, although it wasn't the
official API. This change modifies the idonethis tests to use that
everywhere.
Ran rbintegrations unit tests.
Description | From | Last Updated |
---|---|---|
get_data() has been useless forever. It's literally just defined as return self.data, and we use .data pretty much everywhere else. … |
|
|
json.loads() expects a Unicode string, but request.data should be bytes. Looks like this would apply to others. Can you verify … |
|
|
Wanna change this to assertIsNone? |
|
|
And here? |
|
Description: |
|
||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Commit: |
|
||||||||||||||||||||||||
Diff: |
Revision 2 (+43 -37) |
Checks run (2 succeeded)
-
-
rbintegrations/idonethis/tests.py (Diff revision 2) json.loads()
expects a Unicode string, butrequest.data
should bebytes
.Looks like this would apply to others. Can you verify Python 3 tests are working here?
-
-
Change Summary:
Use
assertIsNone
everywhere that it can be.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 3 (+49 -43) |