From f9f009234641f59434863f0ae07675c7865a4928 Mon Sep 17 00:00:00 2001 From: Marcelo Galigniana Date: Mon, 13 Feb 2023 21:24:37 -0300 Subject: [PATCH] Completed test coverage for django.utils.datastructures. --- tests/utils_tests/test_datastructures.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/utils_tests/test_datastructures.py b/tests/utils_tests/test_datastructures.py index cfa3d8f05c..07229f25ed 100644 --- a/tests/utils_tests/test_datastructures.py +++ b/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")