This file is indexed.

/usr/lib/python2.7/dist-packages/celery/tests/app/test_exceptions.py is in python-celery 3.1.20-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
35
from __future__ import absolute_import

import pickle

from datetime import datetime

from celery.exceptions import Reject, Retry

from celery.tests.case import AppCase


class test_Retry(AppCase):

    def test_when_datetime(self):
        x = Retry('foo', KeyError(), when=datetime.utcnow())
        self.assertTrue(x.humanize())

    def test_pickleable(self):
        x = Retry('foo', KeyError(), when=datetime.utcnow())
        self.assertTrue(pickle.loads(pickle.dumps(x)))


class test_Reject(AppCase):

    def test_attrs(self):
        x = Reject('foo', requeue=True)
        self.assertEqual(x.reason, 'foo')
        self.assertTrue(x.requeue)

    def test_repr(self):
        self.assertTrue(repr(Reject('foo', True)))

    def test_pickleable(self):
        x = Retry('foo', True)
        self.assertTrue(pickle.loads(pickle.dumps(x)))