Exemplo n.º 1
0
def test_get_donation_match_with_amount_lt_max():
    """ test donation match with amount less than max"""
    mailroom = Mailroom()
    amount = mailroom.get_donation_match(11, 3, None, 12)
    assert amount == 33
Exemplo n.º 2
0
def test_get_donation_match_with_amount_gt_max():
    """ test donation match with amount greater than max"""
    mailroom = Mailroom()
    amount = mailroom.get_donation_match(10, 3, None, 5)
    assert amount == 20
Exemplo n.º 3
0
def test_get_donation_match_with_no_max_amount():
    """ test donation match with amount greater than minimum no max"""
    mailroom = Mailroom()
    amount = mailroom.get_donation_match(11, 3, 10, None)
    assert amount == 33
Exemplo n.º 4
0
def test_get_donation_match_with_min_amount_lt_amount():
    """ test donation match with amount greater than  minimum """
    mailroom = Mailroom()
    amount = mailroom.get_donation_match(11, 3, 10, 100)
    assert amount == 33
Exemplo n.º 5
0
def test_get_donation_match_with_min_amount_equals_amount():
    """ test donation match with amount equal to minimum """
    mailroom = Mailroom()
    amount = mailroom.get_donation_match(10, 3, 10, 100)
    assert amount == 30
Exemplo n.º 6
0
def test_get_donation_match_with_min_amount_too_small():
    """ test donation match with amount less than minimum """
    mailroom = Mailroom()
    amount = mailroom.get_donation_match(10, 3, 11, 100)
    assert amount == 10
Exemplo n.º 7
0
def test_get_donation_match_no_min():
    """ test donation match with no min """
    mailroom = Mailroom()
    amount = mailroom.get_donation_match(10, 3, None, 100)
    assert amount == 30