def test_no_model_raise_error_if_query_in_search(self):
        """Test to ensure that providing a query to vectorise will raise an error."""
        for index_name in [self.structured_index_with_no_model, self.unstructured_index_with_no_model]:
            with (self.subTest(index_name=index_name)):
                with self.assertRaises(InvalidArgError) as e:
                    r = tensor_search.search(config=self.config, index_name=index_name, text="test")
                self.assertIn("Cannot vectorise anything with 'no_model'", str(e.exception))
Test to ensure that providing a query to vectorise will raise an error.
tests/integ_tests/tensor_search/integ_tests/test_no_model.py