def METHOD_NAME(dummy_agreement, state, expected):
    dummy_agreement.state = state
    assert dummy_agreement.accepted == expected
    assert Agreement.query.filter_by(accepted=expected).one() == dummy_agreement