예제 #1
0
def test_signed_on_behalf(dummy_agreement, state, expected):
    dummy_agreement.state = state
    assert dummy_agreement.signed_on_behalf == expected
    assert Agreement.find_one(signed_on_behalf=expected) == dummy_agreement
예제 #2
0
def test_pending(dummy_agreement, state, expected):
    dummy_agreement.state = state
    filter_ = Agreement.pending if expected else ~Agreement.pending
    assert dummy_agreement.pending == expected
    assert Agreement.find_one(filter_) == dummy_agreement
    assert not Agreement.find_first(~filter_)
예제 #3
0
def test_rejected(dummy_agreement, state, expected):
    dummy_agreement.state = state
    assert dummy_agreement.rejected == expected
    assert Agreement.find_one(rejected=expected) == dummy_agreement
예제 #4
0
def test_accepted(dummy_agreement, state, expected):
    dummy_agreement.state = state
    assert dummy_agreement.accepted == expected
    assert Agreement.find_one(accepted=expected) == dummy_agreement