def test_recommend_excludeInputDocuments_success(self):
        """
        Test that the recommender excludes input documents when requested
        """
        for index in [self.unstructured_text_index, self.structured_text_index]:
            with self.subTest(type=index.type):
                self._populate_index(index)

                res = self.recommender.recommend(
                    index_name=index.name,
                    documents={"1": 1, "2": 1, "3": 0},
                    exclude_input_documents=True,
                )

                ids = set([doc["_id"] for doc in res["hits"]])

                self.assertFalse(any(doc in ids for doc in ["1", "2", "3"]))

        Test that the recommender excludes input documents when requested
        
tests/integ_tests/core/search/test_recommender.py