Home | History | Annotate | Download | only in test

Lines Matching full:sock

108         sock = socket.socket()
109 sock.bind((self.socket.getsockname()[0], 0))
110 sock.listen(5)
111 sock.settimeout(10)
112 ip, port = sock.getsockname()[:2]
116 conn, addr = sock.accept()
127 sock = socket.socket(socket.AF_INET6)
128 sock.bind((self.socket.getsockname()[0], 0))
129 sock.listen(5)
130 sock.settimeout(10)
131 port = sock.getsockname()[1]
133 conn, addr = sock.accept()
501 # Ensure the connection gets closed; sock attribute should be None
502 self.assertEqual(self.client.sock, None)
661 self.assertNotIsInstance(self.client.sock, ssl.SSLSocket)
663 self.assertIsInstance(self.client.sock, ssl.SSLSocket)
667 sock = self.client.transfercmd('list')
668 self.assertNotIsInstance(sock, ssl.SSLSocket)
669 sock.close()
674 sock = self.client.transfercmd('list')
675 self.assertIsInstance(sock, ssl.SSLSocket)
676 sock.close()
681 sock = self.client.transfercmd('list')
682 self.assertNotIsInstance(sock, ssl.SSLSocket)
683 sock.close()
688 self.assertNotIsInstance(self.client.sock, ssl.SSLSocket)
690 self.assertIsInstance(self.client.sock, ssl.SSLSocket)
718 self.assertNotIsInstance(self.client.sock, ssl.SSLSocket)
720 self.assertIs(self.client.sock.context, ctx)
721 self.assertIsInstance(self.client.sock, ssl.SSLSocket)
724 sock = self.client.transfercmd('list')
726 self.assertIs(sock.context, ctx)
727 self.assertIsInstance(sock, ssl.SSLSocket)
729 sock.close()
764 self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
765 self.sock.settimeout(10)
766 self.port = test_support.bind_port(self.sock)
767 threading.Thread(target=self.server, args=(self.evt,self.sock)).start()
806 self.assertEqual(ftp.sock.gettimeout(), 30)
818 self.assertIsNone(ftp.sock.gettimeout())
825 self.assertEqual(ftp.sock.gettimeout(), 30)
832 self.assertEqual(ftp.sock.gettimeout(), 30)
839 self.assertEqual(ftp.sock.gettimeout(), 30)
847 self.assertEqual(ftp.sock.gettimeout(), 30)