(self, proto, addr)
| 155 | self.assertEqual(buf, TEST_STR) |
| 156 | |
| 157 | def dgram_examine(self, proto, addr): |
| 158 | with socket.socket(proto, socket.SOCK_DGRAM) as s: |
| 159 | if HAVE_UNIX_SOCKETS and proto == socket.AF_UNIX: |
| 160 | s.bind(self.pickaddr(proto)) |
| 161 | s.sendto(TEST_STR, addr) |
| 162 | buf = data = receive(s, 100) |
| 163 | while data and b'\n' not in buf: |
| 164 | data = receive(s, 100) |
| 165 | buf += data |
| 166 | self.assertEqual(buf, TEST_STR) |
| 167 | |
| 168 | def test_TCPServer(self): |
| 169 | self.run_server(socketserver.TCPServer, |