diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2016-12-09 21:31:52 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-12-09 15:31:52 -0500 |
| commit | 8e3a72f4fb4e9d3f93c7d966c13d4e7446b1949e (patch) | |
| tree | d2ed6de49d57d850921bf66a55553f668cb3b3db /tests/utils_tests/test_datastructures.py | |
| parent | 4de8aaf7ffc91b91cbb70e9db406abe9b160575a (diff) | |
Fixed #27583 -- Fixed MultiValueDict.getlist() crash when values for key is None.
Restored the behavior before 727d7ce6cba21363470aaefb2dc5353017531be3.
Diffstat (limited to 'tests/utils_tests/test_datastructures.py')
| -rw-r--r-- | tests/utils_tests/test_datastructures.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/utils_tests/test_datastructures.py b/tests/utils_tests/test_datastructures.py index ea2b147953..f917a2ae4e 100644 --- a/tests/utils_tests/test_datastructures.py +++ b/tests/utils_tests/test_datastructures.py @@ -119,6 +119,11 @@ class MultiValueDictTests(SimpleTestCase): values = x.getlist('b', default=MISSING) self.assertIs(values, MISSING) + def test_getlist_none_empty_values(self): + x = MultiValueDict({'a': None, 'b': []}) + self.assertIsNone(x.getlist('a')) + self.assertEqual(x.getlist('b'), []) + class ImmutableListTests(SimpleTestCase): |
