MCPcopy Index your code
hub / github.com/python/cpython / test_quoting

Method test_quoting

Lib/test/test_urllib.py:1249–1258  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1247 "using sequence of two-item tuples as input")
1248
1249 def test_quoting(self):
1250 # Make sure keys and values are quoted using quote_plus()
1251 given = {"&":"="}
1252 expect = "%s=%s" % (hexescape('&'), hexescape('='))
1253 result = urllib.parse.urlencode(given)
1254 self.assertEqual(expect, result)
1255 given = {"key name":"A bunch of pluses"}
1256 expect = "key+name=A+bunch+of+pluses"
1257 result = urllib.parse.urlencode(given)
1258 self.assertEqual(expect, result)
1259
1260 def test_doseq(self):
1261 # Test that passing True for 'doseq' parameter works correctly

Callers

nothing calls this directly

Calls 2

hexescapeFunction · 0.85
assertEqualMethod · 0.45

Tested by

no test coverage detected