def test_deleted_base_product(self): """ Tests whether a base product which has been deleted will not cause the recommender to fail. """ user_id = "u_tec_1" session = tests.init_session(user_id=user_id, algorithm=self.algorithm) prd.delete_product(session, "p_tec_2") session.refresh() recommender = session.get_recommender() recommendations = recommender.recommend(100) nose.tools.ok_(len(recommendations) > 0, "Should have recommended even from a deleted base product")
def delete_product(session_context, product_id): prd.delete_product(session_context, product_id)