1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #6580 -- Added default parameter to MultiValueDict.getlist method (the base class for QueryDict). Many thanks to mk and andrewebdev.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16260 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jannis Leidel
2011-05-22 15:05:29 +00:00
parent 80d6089029
commit fc8116cc4f
3 changed files with 17 additions and 5 deletions

View File

@@ -206,6 +206,8 @@ class MultiValueDictTests(DatastructuresTestCase):
self.assertEqual(d.get('lastname'), None)
self.assertEqual(d.get('lastname', 'nonexistent'), 'nonexistent')
self.assertEqual(d.getlist('lastname'), [])
self.assertEqual(d.getlist('doesnotexist', ['Adrian', 'Simon']),
['Adrian', 'Simon'])
d.setlist('lastname', ['Holovaty', 'Willison'])
self.assertEqual(d.getlist('lastname'), ['Holovaty', 'Willison'])