Skip to content
Myr

add test with kwargs for api.delete

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 1d1927b · Browse files · 1 file+18 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+18 added−0 removed

  • tests:+18 added−0 removed

1 file+18 added−0 removed

modified:tests/unit/test_requests_api.py+18 added
180 unmodified lines
181 files="files", auth="auth", timeout="timeout",182 allow_redirects=False,183 proxies="proxies", hooks="hooks")184185 @mock.patch('requests.api.request')186 def test_http_delete(self, mock_request):187 mock_request.return_value = Response()188 requests.delete('http://google.com')189 mock_request.assert_called_once_with('delete', 'http://google.com')190191 @mock.patch('requests.api.request')192 def test_http_delete_with_kwargs(self, mock_request):193 mock_request.return_value = Response()194 requests.delete('http://google.com',195 params="params", data="data", headers="headers",196 cookies="cookies",197 files="files", auth="auth", timeout="timeout",198 allow_redirects=False,199 proxies="proxies", hooks="hooks")200 mock_request.assert_called_once_with('delete', 'http://google.com',201 params="params", data="data", headers="headers",202 cookies="cookies",203 files="files", auth="auth", timeout="timeout",204 allow_redirects=False,205 proxies="proxies", hooks="hooks")206207208if __name__ == '__main__':209 unittest.main()