print("The program has ended because of not suitable donor.") exit() # If the returned date from the def is within 18 years of the current date, the program stops. # if (datetime.now() - DonorData.get_date_of_birth()).years < 18: print("\nDonors are only accepted above 18 years.") print("The program has ended because of not suitable donor.") exit() # If the returned date from the def is within 90 days of the current date, the program stops. if (datetime.now() - DonorData.get_donation_date()).days <= 90: print("\nDonors can only give blood once in every 3 months.") print("The program has ended because of not suitable donor.") exit() DonorData.get_sickness() DonorData.get_id_number() DonorData.i_need_your_blood_type() DonorData.i_need_your_exp() DonorData.get_email_address() DonorData.get_mobile_number() # EVENT REGISTRATION # In case E is entered, calls all the Event definitions. elif d_e_s.upper() == "E": EventData.get_event_date() EventData.get_donation_start() EventData.get_donation_end() EventData.get_zip_code() EventData.get_city() EventData.get_address()
def test_get_sickness(self): self.assertEqual("Y", DonorData.get_sickness(self), "The answer should be Y or N.")