Explorar el Código

Completed test coverage for django.utils.datastructures.

Marcelo Galigniana hace 2 años
padre
commit
f9f0092346
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  1. 5 0
      tests/utils_tests/test_datastructures.py

+ 5 - 0
tests/utils_tests/test_datastructures.py

@@ -102,6 +102,11 @@ class MultiValueDictTests(SimpleTestCase):
         self.assertEqual(d.getlist("lastname"), ["Holovaty", "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):
         d = MultiValueDict()
         d.appendlist("name", "Adrian")