MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_post

Method test_post

Lib/test/test_httpservers.py:1118–1124  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1116 self.assertEqual(res.status, HTTPStatus.NOT_FOUND)
1117
1118 def test_post(self):
1119 params = urllib.parse.urlencode(
1120 {'spam' : 1, 'eggs' : 'python', 'bacon' : 123456})
1121 headers = {'Content-type' : 'application/x-www-form-urlencoded'}
1122 res = self.request('/cgi-bin/file2.py', 'POST', params, headers)
1123
1124 self.assertEqual(res.read(), b'1, python, 123456' + self.linesep)
1125
1126 def test_large_content_length(self):
1127 for w in range(15, 25):

Callers

nothing calls this directly

Calls 3

requestMethod · 0.45
assertEqualMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected