MCPcopy
hub / github.com/django/django / test_setitem

Method test_setitem

tests/utils_tests/test_datastructures.py:183–186  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

181 self.assertEqual(x.getlist("b"), [])
182
183 def test_setitem(self):
184 x = MultiValueDict({"a": [1, 2]})
185 x["a"] = 3
186 self.assertEqual(list(x.lists()), [("a", [3])])
187
188 def test_setdefault(self):
189 x = MultiValueDict({"a": [1, 2]})

Callers

nothing calls this directly

Calls 2

listsMethod · 0.95
MultiValueDictClass · 0.90

Tested by

no test coverage detected