From ffef828a8deb86520e3bd6a50d76b2a4ecf3ae71 Mon Sep 17 00:00:00 2001 From: Harrison Gregg Date: Sun, 30 Apr 2017 19:33:51 -0400 Subject: [PATCH] Add test for dropping fields in from_response request body --- tests/test_http_request.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/test_http_request.py b/tests/test_http_request.py index 7eadb874f..bbce537f4 100644 --- a/tests/test_http_request.py +++ b/tests/test_http_request.py @@ -425,6 +425,17 @@ class FormRequestTest(RequestTest): self.assertEqual(fs[b'one'], [b'1']) self.assertEqual(fs[b'two'], [b'2']) + def test_from_response_drop_params(self): + response = _buildresponse( + """
+ + +
""") + req = self.request_class.from_response(response, formdata={'two': None}) + fs = _qs(req) + self.assertEqual(fs[b'one'], [b'1']) + self.assertNotIn(b'two', fs) + def test_from_response_override_method(self): response = _buildresponse( '''