Ejemplo n.º 1
0
def test_bid_get_all_unexpired(app, db, session):
    api.bid_create(test_bid_data_1, scoped_context)
    api.bid_create(test_bid_data_2, scoped_context)

    bids = api.bid_get_all(scoped_context)

    assert len(api.bid_get_all(scoped_context)) == 2
    assert len(api.bid_get_all_unexpired(scoped_context)) == 2

    api.bid_update(bids[1].marketplace_bid_id, dict(status='expired'),
                   scoped_context)
    assert len(api.bid_get_all_unexpired(scoped_context)) == 1
Ejemplo n.º 2
0
def test_bid_get_all_by_project_id(app, db, session):
    api.bid_create(test_bid_data_1, scoped_context)
    api.bid_create(test_bid_data_2, scoped_context)

    assert len(api.bid_get_all(admin_context)) == 2
Ejemplo n.º 3
0
def test_bid_get_all(app, db, session):
    api.bid_create(test_bid_data)
    api.bid_create(test_bid_data)

    assert len(api.bid_get_all()) == 2
Ejemplo n.º 4
0
 def get_all(cls, context):
     all_bids = db.bid_get_all(context)
     return cls._from_db_object_list(all_bids)
Ejemplo n.º 5
0
 def get_all(cls):
     all_bids = db.bid_get_all()
     return cls._from_db_object_list(all_bids)