def test_calculate_time_delta_of_starttime_endtime_case_1(self): start = "13:00" end = "14:00" statement = LogicHelpers.calculate_time_delta_of_starttime_endtime(start, end) self.assertEqual(60, statement)
def test_answer_is_n_return_true(self): statement = LogicHelpers.parse_sickness_answer_to_bool("y") self.assertTrue(statement)
def test_max_donor_number_calculator_is_oke(self): statement = LogicHelpers.calc_max_donor_number(100, 30, 30, 5) self.assertEquals(10, statement)
def test_donor_is_string(self): statement = LogicHelpers.donor_weight_is_acceptable("2") self.assertFalse(statement)
def test_answer_is_y_return_false(self): statement = LogicHelpers.parse_sickness_answer_to_bool("n") self.assertFalse(statement)
def test_id_is_expired_case_2(self): statement = LogicHelpers.id_is_expired("2013.11.19") self.assertTrue(statement)
def test_donor_is_not_50_kg(self): statement = LogicHelpers.donor_weight_is_acceptable(40) self.assertFalse(statement)
def test_date_is_weekday_with_a_saturday(self): statement = LogicHelpers.date_is_weekday("2015.11.21") self.assertFalse(statement)
def test_id_is_expired_case_1(self): statement = LogicHelpers.id_is_expired("2020.01.01") self.assertFalse(statement)
def test_event_date_is_less_than_10_days_ahead(self): statement = LogicHelpers.event_date_is_acceptable("2015.10.26") self.assertFalse(statement)
def test_date_is_weekday_with_a_friday(self): statement = LogicHelpers.date_is_weekday("2015.11.19") self.assertTrue(statement)
def test_event_date_is_more_than_10_days_ahead(self): statement = LogicHelpers.event_date_is_acceptable("2015.12.06") self.assertTrue(statement)
def test_calculate_donor_age(self): statement = LogicHelpers.calculate_age("1995.10.27") self.assertEqual(20, statement)
def test_calculate_donor_age(self): statement = LogicHelpers.calculate_age("1987.07.06") self.assertEqual(28, statement)
def test_timestring_to_datetimeobject(self): giventime = LogicHelpers.parse_timestring_to_datetime("12:25") self.assertIsInstance(giventime, datetime)
def test_datestring_to_datetimeobject(self): givendate = LogicHelpers.parse_datestring_to_datetime("2015.01.01") self.assertIsInstance(givendate, datetime)