MCPcopy
hub / github.com/django/django / test_multivaluedict

Method test_multivaluedict

tests/utils_tests/test_http.py:63–73  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

61 self.assertEqual(urlencode({"a": []}, doseq=True), "")
62
63 def test_multivaluedict(self):
64 result = urlencode(
65 MultiValueDict(
66 {
67 "name": ["Adrian", "Simon"],
68 "position": ["Developer"],
69 }
70 ),
71 doseq=True,
72 )
73 self.assertEqual(result, "name=Adrian&name=Simon&position=Developer")
74
75 def test_dict_with_bytes_values(self):
76 self.assertEqual(urlencode({"a": b"abc"}, doseq=True), "a=abc")

Callers

nothing calls this directly

Calls 2

urlencodeFunction · 0.90
MultiValueDictClass · 0.90

Tested by

no test coverage detected