summaryrefslogtreecommitdiff
path: root/tests/regressiontests/utils/datastructures.py
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2012-03-25 06:53:47 +0000
committerAymeric Augustin <aymeric.augustin@m4x.org>2012-03-25 06:53:47 +0000
commit0bbe7379ee3e2cb290f9c9e841bb2f1457e14b16 (patch)
tree2146f36c48ab87c2eb8bd558b071266bd2ac6aef /tests/regressiontests/utils/datastructures.py
parent15fb61c62ce403bc2ba7f63c5f519a988ce2c5d2 (diff)
[1.3.X] Fixed #17634 -- Optimized the performance of MultiValueDict by using append instead of copy and by minimizing the number of dict lookups. Backport of r17464 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.3.X@17807 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/utils/datastructures.py')
-rw-r--r--tests/regressiontests/utils/datastructures.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/regressiontests/utils/datastructures.py b/tests/regressiontests/utils/datastructures.py
index 3d01ab8b6f..1f8b59ec17 100644
--- a/tests/regressiontests/utils/datastructures.py
+++ b/tests/regressiontests/utils/datastructures.py
@@ -212,6 +212,12 @@ class MultiValueDictTests(DatastructuresTestCase):
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, lambda d: d.copy()]:
d1 = MultiValueDict({