def test_can_get_readable_representation_of_matching_offers_by_requestID(): mabd = MABD() requestID = "rect8dK5CN0kF4f5F" offer_dicts = mabd.get_readable_matching_offers_for_requestID(requestID) assert type(offer_dicts) is list assert len(offer_dicts) == 1 assert offer_dicts[0]["item_name"] == "Four-seater Ikea sofa + footstool"
def get_readable_matching_offers_for_requestID(request_id: str) -> List[dict]: """consumes the id of an open request and produces the list of all of the corresponding request's matching offers, represented as dicts with readable values. """ interface = MABD() return interface.get_readable_matching_offers_for_requestID(request_id)