def test_filter_users(self):
        # We already have doc. Now let's create a review request.
        self.create_review_request(submitter='doc', publish=True)
        self.reindex()

        # Perform the search.
        response = self.search('doc', filter_by='users')
        context = response.context
        self.assertEqual(context['hits_returned'], 1)

        results = context['page'].object_list
        self.assertEqual(results[0].content_type(), 'auth.user')
        self.assertEqual(results[0].username, 'doc')
Testing search with filtering for review requests
dataset/ETHPy150Open reviewboard/reviewboard/reviewboard/search/tests.py/SearchTests.test_filter_users