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

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

        results = context['page'].object_list
        self.assertEqual(results[0].content_type(), 'reviews.reviewrequest')
        self.assertEqual(results[0].summary, review_request.summary)
Testing search with filtering for review requests
dataset/ETHPy150Open reviewboard/reviewboard/reviewboard/search/tests.py/SearchTests.test_filter_review_requests