def test_dateOfEventMinPeriod_emptyString_returnFalse(self):
     event = DonationEvent()
     event.date_of_event = ""
     self.assertFalse(event.check_min_period())
 def test_isWeekend_validString_returnTrue(self):
     event = DonationEvent()
     event.date_of_event = "2016.01.04"
     self.assertTrue(event.is_weekday())
 def test_isWeekday_invalidString_returnFalse(self):
     event = DonationEvent()
     event.date_of_event = "2015.12.26"
     self.assertFalse(event.is_weekday())
 def test_isWeekday_emptyString_returnFalse(self):
     event = DonationEvent()
     event.date_of_event = ""
     self.assertFalse(event.is_weekday())
 def test_dateOfEventMinPeriod_validString_returnTrue(self):
     event = DonationEvent()                   # The date must be at least 10 days after the current date.
     event.date_of_event = datetime.strftime(datetime.now().date() + timedelta(days=11), "%Y.%m.%d")
     self.assertTrue(event.check_min_period())
 def test_dateOfEventMinPeriod_invalidString_returnFalse(self):
     event = DonationEvent()
     event.date_of_event = "2015.12.31"
     self.assertFalse(event.check_min_period())