This file is indexed.

/usr/lib/telepathy-gabble-tests/twisted/vcard/clear-avatar.py is in telepathy-gabble-tests 0.18.2-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
"""
Tests the very simple case of "clearing your own avatar".
"""

from servicetest import call_async
from gabbletest import (
    exec_test, expect_and_handle_get_vcard, expect_and_handle_set_vcard, current_vcard
    )

def test(q, bus, conn, stream):
    photo = current_vcard.addElement((None, 'PHOTO'))
    photo.addElement((None, 'TYPE')).addContent('image/fake')
    photo.addElement((None, 'BINVAL')).addContent('NYANYANYANYANYAN')

    call_async(q, conn.Avatars, 'ClearAvatar')

    expect_and_handle_get_vcard(q, stream)

    def check(vcard):
        assert len(vcard.children) == 0, vcard.toXml()

    expect_and_handle_set_vcard(q, stream, check=check)

    q.expect('dbus-return', method='ClearAvatar')

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