def get_product_by_id(product_id: str = Path( ..., title="The product ID as a valid ObjectId")): return format_result(Products.get_one(product_id))
def test_delete_product(): global product_id result = Products.delete_one(product_id) assert result['success'] is True result = Products.get_one(product_id) assert result['success'] is False