[telepathy-gabble/master] run FT tests using SOCKET_ADDRESS_TYPE_IPV4 too
Guillaume Desmottes
guillaume.desmottes at collabora.co.uk
Fri Apr 3 09:26:28 PDT 2009
---
.../twisted/file-transfer/file_transfer_helper.py | 5 ++++-
...eceive-file-and-close-socket-while-receiving.py | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/tests/twisted/file-transfer/file_transfer_helper.py b/tests/twisted/file-transfer/file_transfer_helper.py
index d6be3d7..ba73584 100644
--- a/tests/twisted/file-transfer/file_transfer_helper.py
+++ b/tests/twisted/file-transfer/file_transfer_helper.py
@@ -131,6 +131,8 @@ class FileTransferTest(object):
def create_socket(self):
if self.address_type == cs.SOCKET_ADDRESS_TYPE_UNIX:
return socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
+ elif self.address_type == cs.SOCKET_ADDRESS_TYPE_IPV4:
+ return socket.socket(socket.AF_INET, socket.SOCK_STREAM)
else:
assert False
@@ -410,6 +412,7 @@ def exec_file_transfer_test(test_cls):
for bytestream_cls in [BytestreamIBBMsg, BytestreamS5B, BytestreamS5BPidgin, BytestreamSIFallbackS5CannotConnect,
BytestreamSIFallbackS5WrongHash]:
for addr_type, access_control, access_control_param in [
- (cs.SOCKET_ADDRESS_TYPE_UNIX, cs.SOCKET_ACCESS_CONTROL_LOCALHOST, "")]:
+ (cs.SOCKET_ADDRESS_TYPE_UNIX, cs.SOCKET_ACCESS_CONTROL_LOCALHOST, ""),
+ (cs.SOCKET_ADDRESS_TYPE_IPV4, cs.SOCKET_ACCESS_CONTROL_LOCALHOST, "")]:
test = test_cls(bytestream_cls, addr_type, access_control, access_control_param)
exec_test(test.test)
diff --git a/tests/twisted/file-transfer/test-receive-file-and-close-socket-while-receiving.py b/tests/twisted/file-transfer/test-receive-file-and-close-socket-while-receiving.py
index 110c27d..373243d 100644
--- a/tests/twisted/file-transfer/test-receive-file-and-close-socket-while-receiving.py
+++ b/tests/twisted/file-transfer/test-receive-file-and-close-socket-while-receiving.py
@@ -6,7 +6,7 @@ from file_transfer_helper import exec_file_transfer_test, ReceiveFileTest
class ReceiveFileAndCancelWhileReceiving(ReceiveFileTest):
def receive_file(self):
# Connect to Gabble's socket
- s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
+ s = self.create_socket()
s.connect(self.address)
# for some reason the socket is closed
--
1.5.6.5
More information about the telepathy-commits
mailing list