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

Method test_send

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

Source from the content-addressed store, hash-verified

1003 self.assertStartsWith(sock.data, expected)
1004
1005 def test_send(self):
1006 expected = b'this is a test this is only a test'
1007 conn = client.HTTPConnection('example.com')
1008 sock = FakeSocket(None)
1009 conn.sock = sock
1010 conn.send(expected)
1011 self.assertEqual(expected, sock.data)
1012 sock.data = b''
1013 conn.send(array.array('b', expected))
1014 self.assertEqual(expected, sock.data)
1015 sock.data = b''
1016 conn.send(io.BytesIO(expected))
1017 self.assertEqual(expected, sock.data)
1018
1019 def test_send_updating_file(self):
1020 def data():

Callers

nothing calls this directly

Calls 3

sendMethod · 0.95
FakeSocketClass · 0.70
assertEqualMethod · 0.45

Tested by

no test coverage detected