This file is indexed.

/usr/lib/telepathy-gabble-tests/twisted/file-transfer/test-ibb-too-early.py is in telepathy-gabble-tests 0.18.3-2build1.

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
25
26
27
28
29
30
31
32
33
34
35
from gabbletest import exec_test

import bytestream
from file_transfer_helper import ReceiveFileTest, File
from servicetest import EventPattern

import constants as cs

from config import FILE_TRANSFER_ENABLED

if not FILE_TRANSFER_ENABLED:
    print "NOTE: built with --disable-file-transfer"
    raise SystemExit(77)

class IbbTooEarlyTest (ReceiveFileTest):
    def __init__ (self):
        ReceiveFileTest.__init__ (self,
            bytestream.BytestreamIBBMsg,
            File (),
            cs.SOCKET_ADDRESS_TYPE_UNIX,
            cs.SOCKET_ACCESS_CONTROL_LOCALHOST,
            "")

    def accept_file (self):
        # Instead of us accepting the other side starts sending the iq open
        # skip the open step explicitely
        self.bytestream.checked = True
        event = self.bytestream.open_bytestream(
            expected_after = [ EventPattern ('stream-iq', iq_type = 'error') ] )
        return True



if __name__ == '__main__':
    exec_test (IbbTooEarlyTest().test)