(self, file_server)
| 32 | connection = client.getConnection("127.0.0.1", 1544) |
| 33 | |
| 34 | def testSslConnection(self, file_server): |
| 35 | client = ConnectionServer(file_server.ip, 1545) |
| 36 | assert file_server != client |
| 37 | |
| 38 | # Connect to myself |
| 39 | with mock.patch('Config.config.ip_local', return_value=[]): # SSL not used for local ips |
| 40 | connection = client.getConnection(file_server.ip, 1544) |
| 41 | |
| 42 | assert len(file_server.connections) == 1 |
| 43 | assert connection.handshake |
| 44 | assert connection.crypt |
| 45 | |
| 46 | |
| 47 | # Close connection |
| 48 | connection.close("Test ended") |
| 49 | client.stop() |
| 50 | time.sleep(0.01) |
| 51 | assert len(file_server.connections) == 0 |
| 52 | assert file_server.num_incoming == 2 # One for file_server fixture, one for the test |
| 53 | |
| 54 | def testRawConnection(self, file_server): |
| 55 | client = ConnectionServer(file_server.ip, 1545) |
nothing calls this directly
no test coverage detected