Skip to content
Myr

add test with kwargs for api.patch

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Daniel Schauenberg · committed by Daniel Schauenberg · parent 42c45df · Browse files · 1 file+16 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+16 added−0 removed

  • tests:+16 added−0 removed

1 file+16 added−0 removed

modified:tests/unit/test_requests_api.py+16 added
157 unmodified lines
158 allow_redirects=False,159 proxies="proxies", hooks="hooks")160161162 @mock.patch('requests.api.request')163 def test_http_patch(self, mock_request):164 mock_request.return_value = Response()165 requests.patch('http://google.com', {})166 mock_request.assert_called_once_with('patch', 'http://google.com',167 data= {})168169 @mock.patch('requests.api.request')170 def test_http_patch_with_kwargs(self, mock_request):171 mock_request.return_value = Response()172 requests.patch('http://google.com',173 params="params", data="data", headers="headers",174 cookies="cookies",175 files="files", auth="auth", timeout="timeout",176 allow_redirects=False,177 proxies="proxies", hooks="hooks")178 mock_request.assert_called_once_with('patch', 'http://google.com',179 params="params", data="data", headers="headers",180 cookies="cookies",181 files="files", auth="auth", timeout="timeout",182 allow_redirects=False,183 proxies="proxies", hooks="hooks")184185 def test_http_delete(self, mock_request):186 mock_request.return_value = Response()187 requests.delete('http://google.com')188 mock_request.assert_called_once_with('delete', 'http://google.com')
3 unmodified lines