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:
@@ -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'])
|
||||
|
||||
Reference in New Issue
Block a user