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

Method test_send

Lib/test/test_httplib.py:1051–1063  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1049 self.assertStartsWith(sock.data, expected)
1050
1051 def test_send(self):
1052 expected = b'this is a test this is only a test'
1053 conn = client.HTTPConnection('example.com')
1054 sock = FakeSocket(None)
1055 conn.sock = sock
1056 conn.send(expected)
1057 self.assertEqual(expected, sock.data)
1058 sock.data = b''
1059 conn.send(array.array('b', expected))
1060 self.assertEqual(expected, sock.data)
1061 sock.data = b''
1062 conn.send(io.BytesIO(expected))
1063 self.assertEqual(expected, sock.data)
1064
1065 def test_send_updating_file(self):
1066 def data():

Callers

nothing calls this directly

Calls 3

sendMethod · 0.95
FakeSocketClass · 0.70
assertEqualMethod · 0.45

Tested by

no test coverage detected