def accept_file(self):
        ReceiveFileTest.accept_file(self)

        presence = domish.Element(('jabber:client', 'presence'))
        presence['from'] = self.contact_full_jid
        presence['to'] = 'test@localhost/Resource'
        presence['type'] = 'unavailable'
        self.stream.send(presence)

        e = self.q.expect('dbus-signal', signal='FileTransferStateChanged')
        state, reason = e.args
        assert state == cs.FT_STATE_CANCELLED
        assert reason == cs.FT_STATE_CHANGE_REASON_REMOTE_STOPPED

        return True
    def accept_file(self):
        ReceiveFileTest.accept_file(self)

        presence = domish.Element(('jabber:client', 'presence'))
        presence['from'] = self.contact_full_jid
        presence['to'] = 'test@localhost/Resource'
        presence['type'] = 'unavailable'
        self.stream.send(presence)

        e = self.q.expect('dbus-signal', signal='FileTransferStateChanged')
        state, reason = e.args
        assert state == cs.FT_STATE_CANCELLED
        assert reason == cs.FT_STATE_CHANGE_REASON_REMOTE_STOPPED

        return True
Esempio n. 3
0
    def accept_file(self):
        # The XMPP connection is broken
        self.outbound.transport.loseConnection()

        ReceiveFileTest.accept_file(self)
Esempio n. 4
0
    def accept_file(self):
        # URI is not set
        assertNoURI(self.ft_channel)

        ReceiveFileTest.accept_file(self)
    def accept_file(self):
        ReceiveFileTest.accept_file(self)

        # The sender of the file disconnects
        self.outbound.transport.loseConnection()
        self.contact_service.stop()
Esempio n. 6
0
    def accept_file(self):
        # sender cancels FT immediately so stop to listen to the HTTP socket
        # before we accept the transfer.
        self.httpd.server_close()

        ReceiveFileTest.accept_file(self)
    def accept_file(self):
        # URI is not set
        assertNoURI(self.ft_channel)

        ReceiveFileTest.accept_file(self)