def test_fill_participant_dictionary(): """Make sure the output formatted dictionary has the right info.""" my_participant = Participant(fake_participant_conf) my_participant._total_raised = 400 my_participant._average_donation = 100 my_participant._goal = 1000 my_participant._fill_participant_dictionary() assert my_participant._participant_formatted_output[ "totalRaised"] == "$400.00" assert my_participant._participant_formatted_output[ "averageDonation"] == "$100.00" assert my_participant._participant_formatted_output["goal"] == "$1,000.00"
def test_format_participant_info_for_output(): """Make sure the right values are grabbed from the participant properties.""" my_participant = Participant(fake_participant_conf) my_participant._total_raised = 400 my_participant._average_donation = 100 my_participant._goal = 1000 assert my_participant._format_participant_info_for_output( my_participant.total_raised) == "$400.00" assert my_participant._format_participant_info_for_output( my_participant.average_donation) == "$100.00" assert my_participant._format_participant_info_for_output( my_participant.goal) == "$1,000.00"