Skip to content
Myr

Add a failing test for Issue #378.

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

authored by Cory Benfield · committed by Cory Benfield · parent 4889adc · Browse files · 1 file+10 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+10 added−0 removed

  • tests:+10 added−0 removed

1 file+10 added−0 removed

modified:tests/test_requests.py+10 added
1111 unmodified lines
1112 """Test that URLs with invalid labels throw1113 Requests.exceptions.InvalidURL instead of UnicodeError."""1114 self.assertRaises(InvalidURL, get, 'http://.google.com/')11151116 def test_none_vals_in_data_are_deleted(self):1117 """Test that keys with None as the value are removed instead of1118 being posted."""1119 data = {'key1': 'value1', 'key2': None}1120 r = post(httpbin('post'), data=data)1121 vals = r.json['form']1122 self.assertEqual(vals['key1'], 'value1')1123 # The 'key2' key should not have been sent.1124 self.assertTrue(vals.get('key2') is None)11251126if __name__ == '__main__':1127 unittest.main()