Lines Matching refs:sock
105 conn.sock = FakeSocket('blahblahblah')
133 conn.sock = FakeSocket(None)
149 conn.sock = FakeSocket(None)
162 conn.sock = FakeSocket(None)
173 conn.sock = FakeSocket(None)
183 conn.sock = FakeSocket(None)
221 sock = FakeSocket('')
222 conn.sock = sock
224 self.assertTrue(sock.data.startswith(expected))
229 sock = FakeSocket('')
230 conn.sock = sock
232 self.assertTrue(sock.data.startswith(expected))
237 sock = FakeSocket(body)
238 resp = httplib.HTTPResponse(sock)
345 sock = FakeSocket(body)
346 resp = httplib.HTTPResponse(sock)
360 conn.sock = FakeSocket('')
393 sock = FakeSocket(body)
394 resp = httplib.HTTPResponse(sock)
402 sock = FakeSocket(body)
403 resp = httplib.HTTPResponse(sock)
414 sock = FakeSocket(body)
415 resp = httplib.HTTPResponse(sock)
426 sock = FakeSocket(body)
427 resp = httplib.HTTPResponse(sock)
439 sock = FakeSocket(body)
440 resp = httplib.HTTPResponse(sock)
490 sock = FakeSocket(
495 resp = httplib.HTTPResponse(sock, method="HEAD")
513 sock = FakeSocket(body)
514 conn.sock = sock
516 self.assertTrue(sock.data.startswith(expected))
517 self.assertIn('def test_send_file', sock.data)
529 sock = FakeSocket(body)
530 conn.sock = sock
532 self.assertEqual(sock.data, expected)
537 sock = FakeSocket(None)
538 conn.sock = sock
540 self.assertEqual(expected, sock.data)
541 sock.data = ''
543 self.assertEqual(expected, sock.data)
544 sock.data = ''
546 self.assertEqual(expected, sock.data)
557 sock = FakeSocket(chunked_start + '0\r\n')
558 resp = httplib.HTTPResponse(sock, method="GET")
564 sock = FakeSocket(chunked_start + x)
565 resp = httplib.HTTPResponse(sock, method="GET")
587 sock = FakeSocket(chunked_start + '0\r\n')
588 resp = httplib.HTTPResponse(sock, method="HEAD")
596 sock = FakeSocket('HTTP/1.1 200 OK\r\n'
598 resp = httplib.HTTPResponse(sock, method="GET")
604 sock = FakeSocket('HTTP/1.1 200 OK\r\nContent-Length: 10\r\n\r\nHello\r\n')
605 resp = httplib.HTTPResponse(sock, method="GET")
620 sock = EPipeSocket(
626 conn.sock = sock
637 sock = FakeSocket(body)
638 resp = httplib.HTTPResponse(sock)
673 sock = FakeSocket(body)
674 resp = httplib.HTTPResponse(sock)
688 conn.sock = FakeSocket('') # Emulate server dropping connection
693 self.assertTrue(conn.sock.file_closed)
701 conn.sock = FakeSocket(body)
734 self.assertEqual(self.conn.sock.getsockname()[1], self.source_port)
788 self.assertEqual(httpConn.sock.gettimeout(), 30)
800 self.assertEqual(httpConn.sock.gettimeout(), None)
806 self.assertEqual(httpConn.sock.gettimeout(), 30)
967 self.assertEqual(conn.sock.host, 'proxy.com')
968 self.assertEqual(conn.sock.port, 80)
969 self.assertIn('CONNECT destination.com', conn.sock.data)
971 self.assertNotIn('Host: destination.com:None', conn.sock.data)
972 self.assertIn('Host: destination.com', conn.sock.data)
974 self.assertNotIn('Host: proxy.com', conn.sock.data)
979 self.assertEqual(conn.sock.host, 'proxy.com')
980 self.assertEqual(conn.sock.port, 80)
981 self.assertTrue('CONNECT destination.com' in conn.sock.data)
982 self.assertTrue('Host: destination.com' in conn.sock.data)