mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #17634 -- Optimized the performance of MultiValueDict by using append instead of copy and by minimizing the number of dict lookups. Refs #736.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17464 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -206,6 +206,12 @@ class MultiValueDictTests(SimpleTestCase):
|
||||
self.assertEqual(list(d.itervalues()),
|
||||
['Developer', 'Simon', 'Willison'])
|
||||
|
||||
def test_appendlist(self):
|
||||
d = MultiValueDict()
|
||||
d.appendlist('name', 'Adrian')
|
||||
d.appendlist('name', 'Simon')
|
||||
self.assertEqual(d.getlist('name'), ['Adrian', 'Simon'])
|
||||
|
||||
def test_copy(self):
|
||||
for copy_func in [copy.copy, lambda d: d.copy()]:
|
||||
d1 = MultiValueDict({
|
||||
|
||||
Reference in New Issue
Block a user