RESOLVED FIXED 218927
[webkitcorepy] Support mocking request network calls.
https://bugs.webkit.org/show_bug.cgi?id=218927
Summary [webkitcorepy] Support mocking request network calls.
Jonathan Bedard
Reported 2020-11-13 16:16:50 PST
Similar to the utilities provided for subprocess, we should provide utilities to mock request's network calls.
Attachments
Patch (14.98 KB, patch)
2020-11-13 20:38 PST, Jonathan Bedard
no flags
Patch (16.16 KB, patch)
2020-11-17 12:14 PST, Jonathan Bedard
no flags
Radar WebKit Bug Importer
Comment 1 2020-11-13 16:23:58 PST
Jonathan Bedard
Comment 2 2020-11-13 20:38:19 PST
Aakash Jain
Comment 3 2020-11-16 15:24:59 PST
Comment on attachment 414122 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=414122&action=review rs=me. > Tools/ChangeLog:11 > + * Scripts/libraries/webkitcorepy/webkitcorepy/mocks/requests.py: Moved to requests_. why? > Tools/Scripts/libraries/webkitcorepy/webkitcorepy/tests/mocks/requests_unittest.py:29 > +class MockRequests(unittest.TestCase): can we add more unit-tests here, maybe for headers, and also request_.Response class (various status codes).
Jonathan Bedard
Comment 4 2020-11-16 15:51:49 PST
Comment on attachment 414122 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=414122&action=review >> Tools/ChangeLog:11 >> + * Scripts/libraries/webkitcorepy/webkitcorepy/mocks/requests.py: Moved to requests_. > > why? Otherwise Python 2 gets very confused when trying to import requests from requests.py.
Jonathan Bedard
Comment 5 2020-11-17 12:14:37 PST
EWS
Comment 6 2020-11-17 13:02:14 PST
Committed r269919: <https://trac.webkit.org/changeset/269919> All reviewed patches have been landed. Closing bug and clearing flags on attachment 414367 [details].
Note You need to log in before you can comment on or make changes to this bug.