mirror of
https://github.com/django/django.git
synced 2024-12-23 01:25:58 +00:00
Completed test coverage for django.utils.datastructures.
This commit is contained in:
parent
f608e6a157
commit
f9f0092346
@ -102,6 +102,11 @@ class MultiValueDictTests(SimpleTestCase):
|
|||||||
self.assertEqual(d.getlist("lastname"), ["Holovaty", "Willison"])
|
self.assertEqual(d.getlist("lastname"), ["Holovaty", "Willison"])
|
||||||
self.assertEqual(list(d.values()), ["Simon", "Developer", [], "Willison"])
|
self.assertEqual(list(d.values()), ["Simon", "Developer", [], "Willison"])
|
||||||
|
|
||||||
|
d.setlistdefault("lastname", ["Doe"])
|
||||||
|
self.assertEqual(d.getlist("lastname"), ["Holovaty", "Willison"])
|
||||||
|
d.setlistdefault("newkey", ["Doe"])
|
||||||
|
self.assertEqual(d.getlist("newkey"), ["Doe"])
|
||||||
|
|
||||||
def test_appendlist(self):
|
def test_appendlist(self):
|
||||||
d = MultiValueDict()
|
d = MultiValueDict()
|
||||||
d.appendlist("name", "Adrian")
|
d.appendlist("name", "Adrian")
|
||||||
|
Loading…
Reference in New Issue
Block a user