This file is indexed.

/usr/lib/python2.7/dist-packages/chef/tests/test_fabric.py is in python-chef 0.2.3-2.

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
import mock

from chef.fabric import chef_roledefs
from chef.tests import ChefTestCase, mockSearch

class FabricTestCase(ChefTestCase):
    @mock.patch('chef.search.Search')
    def test_roledef(self, MockSearch):
        search_data = {
            ('role', '*:*'): {},
        }
        search_mock_memo = {}
        def search_mock(index, q='*:*', *args, **kwargs):
            data = search_data[index, q]
            search_mock_inst = search_mock_memo.get((index, q))
            if search_mock_inst is None:
                search_mock_inst = search_mock_memo[index, q] = mock.Mock()
                search_mock_inst.data = data
            return search_mock_inst
        MockSearch.side_effect = search_mock
        print MockSearch('role').data
        

    @mockSearch({('role', '*:*'): {1:2}})
    def test_roledef2(self, MockSearch):
        print MockSearch('role').data