This file is indexed.

/usr/share/pyshared/twisted/words/test/test_jabberjstrports.py is in python-twisted-words 11.1.0-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
25
26
27
28
29
30
31
32
33
34
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.

"""
Tests for L{twisted.words.protocols.jabber.jstrports}.
"""

from twisted.trial import unittest

from twisted.words.protocols.jabber import jstrports
from twisted.application.internet import TCPClient


class JabberStrPortsPlaceHolderTest(unittest.TestCase):
    """
    Tests for L{jstrports}
    """

    def test_parse(self):
        """
        L{jstrports.parse} accepts an endpoint description string and returns a
        tuple and dict of parsed endpoint arguments.
        """
        expected = ('TCP', ('DOMAIN', 65535, 'Factory'), {})
        got = jstrports.parse("tcp:DOMAIN:65535", "Factory")
        self.assertEqual(expected, got)


    def test_client(self):
        """
        L{jstrports.client} returns a L{TCPClient} service.
        """
        got = jstrports.client("tcp:DOMAIN:65535", "Factory")
        self.assertIsInstance(got, TCPClient)