(self)
| 793 | self.assertFalse(is_client_connected()) |
| 794 | |
| 795 | def test_source_address(self): |
| 796 | self.client.quit() |
| 797 | port = socket_helper.find_unused_port() |
| 798 | try: |
| 799 | self.client.connect(self.server.host, self.server.port, |
| 800 | source_address=(HOST, port)) |
| 801 | self.assertEqual(self.client.sock.getsockname()[1], port) |
| 802 | self.client.quit() |
| 803 | except OSError as e: |
| 804 | if e.errno == errno.EADDRINUSE: |
| 805 | self.skipTest("couldn't bind to port %d" % port) |
| 806 | raise |
| 807 | |
| 808 | def test_source_address_passive_connection(self): |
| 809 | port = socket_helper.find_unused_port() |
nothing calls this directly
no test coverage detected