Skip to content
Myr

add test with kwargs for api.post

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 5c5c13a · Browse files · 1 file+17 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+17 added−0 removed

  • tests:+17 added−0 removed

1 file+17 added−0 removed

modified:tests/unit/test_requests_api.py+17 added
109 unmodified lines
110 files="files", auth="auth", timeout="timeout",111 allow_redirects=False,112 proxies="proxies", hooks="hooks")113114 @mock.patch('requests.api.request')115 def test_http_post(self, mock_request):116 mock_request.return_value = Response()117 requests.post('http://google.com', {})118 mock_request.assert_called_once_with('post', 'http://google.com',119 data= {})120121 @mock.patch('requests.api.request')122 def test_http_post_with_kwargs(self, mock_request):123 mock_request.return_value = Response()124 requests.post('http://google.com',125 params="params", data="data", headers="headers",126 cookies="cookies",127 files="files", auth="auth", timeout="timeout",128 allow_redirects=False,129 proxies="proxies", hooks="hooks")130 mock_request.assert_called_once_with('post', 'http://google.com',131 params="params", data="data", headers="headers",132 cookies="cookies",133 files="files", auth="auth", timeout="timeout",134 allow_redirects=False,135 proxies="proxies", hooks="hooks")136137138 def test_http_put(self, mock_request):139 mock_request.return_value = Response()140 requests.put('http://google.com', {})141 mock_request.assert_called_once_with('put', 'http://google.com',
17 unmodified lines