Ejemplo n.º 1
0
def test_calculate_average_donation_no_donations():
    """Make sure the average donation is properly calculated if there haven't been any donations yet."""
    my_participant = Participant(fake_participant_conf)
    my_participant._total_raised = 0
    my_participant._number_of_donations = 0
    assert my_participant._calculate_average_donation() == 0
Ejemplo n.º 2
0
def test_calculate_average_donation():
    """Make sure the average donation is properly calculated."""
    my_participant = Participant(fake_participant_conf)
    my_participant._total_raised = 100
    my_participant._number_of_donations = 2
    assert my_participant._calculate_average_donation() == 50