# 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
donor2 = eldonationtracker.api.donor.Donor(donor2_json)
fake_top_donor_json = [{"displayName": "Top Donor", "sumDonations": "100", "donorID": 1000111,
                       'avatarImageURL': "http://someplace.com/image.jpg", "numDonations": 2}]

donation1_json = {"displayName": "Donor 1", "participantID": '4939d', "amount": 34.51, "donorID": "FAKE3C59D235B4DA",
                  "avatarImageURL": "//image.png", "message": "Good job! From Donor 1",
                  "createdDateUTC": "2020-02-11T17:22:23.963+0000", "eventID": 547, "teamID": 50394,
                  "donationID": "861A3C59D235B4DA"}
donation2_json = {"displayName": "Donor 2", "participantID": '4939d', "amount": 34.51, "donorID": "FAKE3C59D235B4DA",
                  "avatarImageURL": "//image.png",
                  "createdDateUTC": "2020-02-11T17:22:23.963+0000", "eventID": 547, "teamID": 50394,
                  "donationID": "861A3C59D235B4DB"}
donation_anonymous_json = {"displayName": None, "participantID": '4939d', "amount": 34.51,
                           "donorID": "FAKE3C59D235B4DA", "avatarImageURL": "//image.png",
                           "message": "Good job! From Donor 3",
                           "createdDateUTC": "2020-02-11T17:22:23.963+0000", "eventID": 547, "teamID": 50394,
                           "donationID": "861A3C59D235B4DC"}


fake_extralife_io = mock.Mock()
fake_extralife_io.get_json.return_value = fake_participant_info
fake_extralife_io.get_JSON_donations.return_value = fake_donations
fake_extralife_io.get_JSON_no_json.return_value = {}
fake_extralife_io.get_JSON_donations_no_json.return_value = {}
fake_extralife_io.get_JSON_top_donor_no_json.return_value = {}
fake_extralife_io.get_json_no_team.return_value = fake_participant_info_no_team

magic_fake_extralife_io = mock.MagicMock()
magic_fake_extralife_io.get_JSON_top_donor.return_value = fake_top_donor_json


# 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

donor2 = eldonationtracker.api.donor.Donor(donor2_json)
fake_top_donor_json = [{"displayName": "Top Donor", "sumDonations": "100", "donorID": 1000111,
                       'avatarImageURL': "http://someplace.com/image.jpg", "numDonations": 2}]

donation1_json = {"displayName": "Donor 1", "participantID": '4939d', "amount": 34.51, "donorID": "FAKE3C59D235B4DA",
                  "avatarImageURL": "//image.png", "message": "Good job! From Donor 1",
                  "createdDateUTC": "2020-02-11T17:22:23.963+0000", "eventID": 547, "teamID": 50394,
                  "donationID": "861A3C59D235B4DA"}
donation2_json = {"displayName": "Donor 2", "participantID": '4939d', "amount": 34.51, "donorID": "FAKE3C59D235B4DA",
                  "avatarImageURL": "//image.png",
                  "createdDateUTC": "2020-02-11T17:22:23.963+0000", "eventID": 547, "teamID": 50394,
                  "donationID": "861A3C59D235B4DB"}
donation_anonymous_json = {"displayName": None, "participantID": '4939d', "amount": 34.51,
                           "donorID": "FAKE3C59D235B4DA", "avatarImageURL": "//image.png",
                           "message": "Good job! From Donor 3",
                           "createdDateUTC": "2020-02-11T17:22:23.963+0000", "eventID": 547, "teamID": 50394,
                           "donationID": "861A3C59D235B4DC"}


fake_extralife_io = mock.Mock()
fake_extralife_io.get_json.return_value = fake_participant_info
fake_extralife_io.get_JSON_donations.return_value = fake_donations
fake_extralife_io.get_JSON_no_json.return_value = {}
fake_extralife_io.get_JSON_donations_no_json.return_value = {}
fake_extralife_io.get_JSON_top_donor_no_json.return_value = {}
fake_extralife_io.get_json_no_team.return_value = fake_participant_info_no_team

magic_fake_extralife_io = mock.MagicMock()
magic_fake_extralife_io.get_JSON_top_donor.return_value = fake_top_donor_json


fake_participant = mock.Mock()