/usr/lib/telepathy-gabble-tests/twisted/jingle-share/test-receive-file-and-close-socket-while-receiving.py is in telepathy-gabble-tests 0.18.4-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | import constants as cs
from file_transfer_helper import SendFileTest, ReceiveFileTest, \
exec_file_transfer_test
from config import JINGLE_FILE_TRANSFER_ENABLED
if not JINGLE_FILE_TRANSFER_ENABLED:
print "NOTE: built with --disable-file-transfer or --disable-voip"
raise SystemExit(77)
class ReceiveFileAndCancelWhileReceiving(ReceiveFileTest):
def receive_file(self):
# Connect to Gabble's socket
s = self.create_socket()
s.connect(self.address)
# for some reason the socket is closed
s.close()
self.q.expect('dbus-signal', signal='FileTransferStateChanged',
args=[cs.FT_STATE_CANCELLED, cs.FT_STATE_CHANGE_REASON_LOCAL_ERROR])
if __name__ == '__main__':
exec_file_transfer_test(SendFileTest, ReceiveFileAndCancelWhileReceiving)
|