From 80fe5dc147cf2d90128e2f4966976b3a7a7ee932 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 20 Feb 2012 12:31:52 -0500 Subject: [PATCH] none headers test #433 --- tests/test_requests.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test_requests.py b/tests/test_requests.py index 7cfb7de..eb3567b 100755 --- a/tests/test_requests.py +++ b/tests/test_requests.py @@ -782,5 +782,12 @@ class RequestsTestSuite(TestSetup, unittest.TestCase): get, 'ftp://ftp.kernel.org/pub/') + def test_can_have_none_in_header_values(self): + try: + # Don't choke on headers with none in the value. + requests.get(httpbin('headers'), headers={'Foo': None}) + except TypeError: + self.fail() + if __name__ == '__main__': unittest.main() -- 2.34.1