def test_0_match(app, db, session): assert len(get_all_matching_offers(scoped_context, [["memory", "==", 204]])) == 0
def test_2_match(app, db, session): offer.Offer.create(test_offer_1, scoped_context) offer.Offer.create(test_offer_2, scoped_context) assert len(get_all_matching_offers(scoped_context, [["memory", ">", 202]])) == 2
def test_2_match(is_resource_admin, app, db, session): is_resource_admin.return_vale = True offer.Offer.create(test_offer_1, scoped_context) offer.Offer.create(test_offer_2, scoped_context) assert len(get_all_matching_offers(scoped_context, [["memory", ">", 202]])) == 2