blob: d1b6a0f00d260ff19733e255c6ac0d5ed5ba43cd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
import dbus
import socket
from saluttest import exec_test
from file_transfer_helper import ReceiveFileTest
class ReceiveFileAndXmppDisconnectTest(ReceiveFileTest):
def accept_file(self):
# The XMPP connection is broken
self.outbound.transport.loseConnection()
ReceiveFileTest.accept_file(self)
def receive_file(self):
# Connect to Salut's socket
s = socket.socket(self._get_socket_address_family(), socket.SOCK_STREAM)
s.connect(self.address)
self.httpd.handle_request()
# Salut doesn't send the IQ reply as the XMPP connection was broken
self._read_file_from_socket(s)
if __name__ == '__main__':
test = ReceiveFileAndXmppDisconnectTest()
exec_test(test.test)
|