# Path: eldonationtracker/api/participant.py
# class Participant(donor_drive_participant.Participant):
#     def __init__(self, config):
#     def set_config_values(self) -> None:
#     def output_participant_data(self) -> None:  # pragma: no cover
#     def output_donation_data(self) -> None:
#     def output_donor_data(self) -> None:
#     def output_milestone_data(self) -> None:  # pragma: no cover
#     def output_incentive_data(self) -> None:  # pragma: no cover
#     def write_text_files(self, dictionary: dict) -> None:  # pragma: no cover
#     def run(self) -> None:
# 
# Path: eldonationtracker/api/badge.py
# class Badge:
#     """Achievement Badges associated with a Participant or Team.
# 
#     For Donor Drive API information: https://github.com/DonorDrive/PublicAPI/blob/master/resources/badges.md
# 
#     :param badge_code: A unique identifier for this badge.
#     :type: str
#     :param badge_image_url: The URL for the image associated with this badge
#     :type: str
#     :param description: The description of this badge
#     :type: str
#     :param title: The title of this badge
#     :type: str
#     :param unlocked_date_utc: The date this badge was unlocked by the Participant or Team
#     :type: str
#     """
#     badge_code: str
#     badge_image_url: str
#     description: str
#     title: str
#     unlocked_date_utc: str
# 
#     @staticmethod
#     def create_badge(json_data: dict):
#         """Create a badge based on the JSON data.
# 
#         :param json_data: The JSON data for this badge.
#         :type: dict
#         :returns: a Badge object
#         """
#         return Badge(json_data.get("badgeCode"), json_data.get("badgeImageURL"), json_data.get("description"),
#                      json_data.get('title'), json_data.get("unlockedDateUTC"))


import json
import eldonationtracker.api.participant
import donordrivepython.api.comms
from unittest import mock
from eldonationtracker.api.participant import Participant, Milestone
from eldonationtracker.api.badge import Badge
    fake_participant._format_donation_information_for_output.assert_called()
    fake_participant.write_text_files.assert_called()


@mock.patch.object(eldonationtracker.api.participant.Participant, 'write_text_files', fake_participant.write_text_files)
@mock.patch.object(eldonationtracker.api.participant.Participant, '_format_donor_information_for_output',
                   fake_participant._format_donor_information_for_output)
def test_output_donor_data_no_donations():
    my_participant = Participant(fake_participant_conf)
    my_participant.output_donor_data()
    fake_participant._format_donor_information_for_output.assert_not_called()
    fake_participant.write_text_files.assert_called()


@mock.patch.object(eldonationtracker.api.participant.Participant, 'write_text_files', fake_participant.write_text_files)
@mock.patch.object(eldonationtracker.api.participant.Participant, '_format_donor_information_for_output',
                   fake_participant._format_donor_information_for_output)
def test_output_donor_data_no_top_donor():
    my_participant = Participant(fake_participant_conf)
    my_participant._donation_list = ["a donor", "another_donor"]
    my_participant._donor_list = []
    my_participant.output_donor_data()
    assert fake_participant._format_donor_information_for_output.assert_not_called
    assert fake_participant.write_text_files.called


@mock.patch.object(eldonationtracker.api.participant.Participant, 'write_text_files', fake_participant.write_text_files)
@mock.patch.object(eldonationtracker.api.participant.Participant, '_format_donor_information_for_output',
                   fake_participant._format_donor_information_for_output)
def test_output_donor_data():

# Path: eldonationtracker/api/participant.py
# class Participant(donor_drive_participant.Participant):
#     def __init__(self, config):
#     def set_config_values(self) -> None:
#     def output_participant_data(self) -> None:  # pragma: no cover
#     def output_donation_data(self) -> None:
#     def output_donor_data(self) -> None:
#     def output_milestone_data(self) -> None:  # pragma: no cover
#     def output_incentive_data(self) -> None:  # pragma: no cover
#     def write_text_files(self, dictionary: dict) -> None:  # pragma: no cover
#     def run(self) -> None:
# 
# Path: eldonationtracker/api/badge.py
# class Badge:
#     """Achievement Badges associated with a Participant or Team.
# 
#     For Donor Drive API information: https://github.com/DonorDrive/PublicAPI/blob/master/resources/badges.md
# 
#     :param badge_code: A unique identifier for this badge.
#     :type: str
#     :param badge_image_url: The URL for the image associated with this badge
#     :type: str
#     :param description: The description of this badge
#     :type: str
#     :param title: The title of this badge
#     :type: str
#     :param unlocked_date_utc: The date this badge was unlocked by the Participant or Team
#     :type: str
#     """
#     badge_code: str
#     badge_image_url: str
#     description: str
#     title: str
#     unlocked_date_utc: str
# 
#     @staticmethod
#     def create_badge(json_data: dict):
#         """Create a badge based on the JSON data.
# 
#         :param json_data: The JSON data for this badge.
#         :type: dict
#         :returns: a Badge object
#         """
#         return Badge(json_data.get("badgeCode"), json_data.get("badgeImageURL"), json_data.get("description"),
#                      json_data.get('title'), json_data.get("unlockedDateUTC"))


# Path: eldonationtracker/tests/test_participant.py
import json
import eldonationtracker.api.participant
import donordrivepython.api.comms
from unittest import mock
from eldonationtracker.api.participant import Participant, Milestone
from eldonationtracker.api.badge import Badge

    fake_participant._format_donation_information_for_output.assert_called()
    fake_participant.write_text_files.assert_called()


@mock.patch.object(eldonationtracker.api.participant.Participant, 'write_text_files', fake_participant.write_text_files)
@mock.patch.object(eldonationtracker.api.participant.Participant, '_format_donor_information_for_output',
                   fake_participant._format_donor_information_for_output)
def test_output_donor_data_no_donations():
    my_participant = Participant(fake_participant_conf)
    my_participant.output_donor_data()
    fake_participant._format_donor_information_for_output.assert_not_called()
    fake_participant.write_text_files.assert_called()


@mock.patch.object(eldonationtracker.api.participant.Participant, 'write_text_files', fake_participant.write_text_files)
@mock.patch.object(eldonationtracker.api.participant.Participant, '_format_donor_information_for_output',
                   fake_participant._format_donor_information_for_output)
def test_output_donor_data_no_top_donor():
    my_participant = Participant(fake_participant_conf)
    my_participant._donation_list = ["a donor", "another_donor"]
    my_participant._donor_list = []
    my_participant.output_donor_data()
    assert fake_participant._format_donor_information_for_output.assert_not_called
    assert fake_participant.write_text_files.called


@mock.patch.object(eldonationtracker.api.participant.Participant, 'write_text_files', fake_participant.write_text_files)
@mock.patch.object(eldonationtracker.api.participant.Participant, '_format_donor_information_for_output',
                   fake_participant._format_donor_information_for_output)
def test_output_donor_data():

    my_participant = Participant(fake_participant_conf)