def test_date_is_gte_5(self): """date_is_gte: test de comparacion incorrecta por formato""" d1 = '2017-01-01 00:00:00' d2 = '2017-01-01 00:00:00' formatter = '%d/%m/%Y %H:%M:%S' test_list = list() test_list.append(d1) test_list.append(d2) test_list.append(formatter) op.date_is_gte(test_list)
def test_date_is_gte_7(self): """date_is_gte: test de comparacion correcta con fechas inversas""" d1 = '2017-01-01 00:00:00' d2 = '2017-01-31 00:00:00' test_list = list() test_list.append(d1) test_list.append(d2) res = op.date_is_gte(test_list) assert_false(res)
def test_date_is_gte_6(self): """date_is_gte: test de comparacion correcta con fechas iguales""" d1 = '2017-01-01 00:00:00' d2 = '2017-01-01 00:00:00' test_list = list() test_list.append(d1) test_list.append(d2) res = op.date_is_gte(test_list) assert_true(res)
def test_date_is_gte_3(self): """date_is_gte: test de comparacion incorrecta por time""" d1 = '2017-01-01 00:00:00' d2 = '2017-01-01 11:00:00' test_list = list() test_list.append(d1) test_list.append(d2) res = op.date_is_gte(test_list) assert_false(res)
def test_date_is_gte_4(self): """date_is_gte: test de comparacion correcta con otro formato""" d1 = '01/01/2017 20:00:00' d2 = '01/01/2017 00:00:00' formatter = '%d/%m/%Y %H:%M:%S' test_list = list() test_list.append(d1) test_list.append(d2) test_list.append(formatter) res = op.date_is_gte(test_list) assert_true(res)