예제 #1
0
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"
예제 #2
0
파일: api.py 프로젝트: circius/mabd-flask
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)