@@ -0,0 +1,824 @@
+from file_transfer_helper import SendFileTest, FT_STATE_CANCELLED, %5C%0A    FT_STATE_CHANGE_REASON_LOCAL_STOPPED, exec_file_transfer_test%0A%0Aclass SendFileAndCancelImmediatelyTest(SendFileTest):%0A    def provide_file(self):%0A        SendFileTest.provide_file(self)%0A%0A        # cancel the transfer before the receiver accepts it%0A        self.channel.Close()%0A%0A        e = self.q.expect('dbus-signal', signal='FileTransferStateChanged')%0A        state, reason = e.args%0A        assert state == FT_STATE_CANCELLED%0A        assert reason == FT_STATE_CHANGE_REASON_LOCAL_STOPPED%0A%0A        self.q.expect('dbus-signal', signal='Closed')%0A%0A        # XEP-0096 doesn't have a way to inform receiver we cancelled the%0A        # transfer...%0A        return True%0A%0Aif __name__ == '__main__':%0A    exec_file_transfer_test(SendFileAndCancelImmediatelyTest)%0A

add test-send-file-and-cancel-immediately.py