def test_diff_dates_in_days_6(self): """diff_dates_in_days: test sin formato estandar y sin especificarlo para que salte excepcion""" d1 = '2017/01/01' d2 = '2017/01/11' test_list = list() test_list.append(d1) test_list.append(d2) op.diff_dates_in_days(test_list)
def test_diff_dates_in_days_7(self): """diff_dates_in_days: test de fechas sin date pero si con time, con formato año/mes/dia para que salte excepcion""" d1 = '00:00:00' d2 = '10:00:00' formatter = '%Y/%m/%d' test_list = list() test_list.append(d1) test_list.append(d2) test_list.append(formatter) op.diff_dates_in_days(test_list)
def test_diff_dates_in_days_10(self): """diff_dates_in_days: test con mas argumentos de los necesarios para que salte excepcion""" d1 = '2017/01/01' d2 = '2017/01/11' d3 = '' d4 = '' test_list = list() test_list.append(d1) test_list.append(d2) test_list.append(d3) test_list.append(d4) op.diff_dates_in_days(test_list)
def test_diff_dates_in_days_4(self): """diff_dates_in_days: test con formato estandar con valor incorrecto""" d1 = '2017-01-01 00:00:00' d2 = '2017-01-12 00:00:01' test_list = list() test_list.append(d1) test_list.append(d2) days = op.diff_dates_in_days(test_list) assert_not_equal(10, days)
def test_diff_dates_in_days_3(self): """diff_dates_in_days: test con formato estandar con la hora limite del dia""" d1 = '2017-01-01 00:00:00' d2 = '2017-01-11 23:59:59' test_list = list() test_list.append(d1) test_list.append(d2) days = op.diff_dates_in_days(test_list) assert_equal(10, days)
def test_diff_dates_in_days_2(self): """diff_dates_in_days: test con formato estandar con una hora distinta""" d1 = '2017-01-01 00:00:00' d2 = '2017-01-11 10:00:00' test_list = list() test_list.append(d1) test_list.append(d2) days = op.diff_dates_in_days(test_list) assert_equal(10, days)
def test_diff_dates_in_days_11(self): """diff_dates_in_days: test con fechas al reves""" d1 = '2017-01-11 00:00:00' d2 = '2017-01-01 00:00:00' test_list = list() test_list.append(d1) test_list.append(d2) days = op.diff_dates_in_days(test_list) assert_equal(-10, days)
def test_diff_dates_in_days_5(self): """diff_dates_in_days: test en formato año/mes/dia sin horas""" d1 = '2017/01/01' d2 = '2017/01/11' formatter = '%Y/%m/%d' test_list = list() test_list.append(d1) test_list.append(d2) test_list.append(formatter) days = op.diff_dates_in_days(test_list) assert_equal(10, days)
def test_diff_dates_in_days_8(self): """diff_dates_in_days: test de fechas sin date pero si con time, con formato año/mes/dia para que este en el mismo dia""" d1 = '00:00:00' d2 = '10:00:00' formatter = '%H:%M:%S' test_list = list() test_list.append(d1) test_list.append(d2) test_list.append(formatter) days = op.diff_dates_in_days(test_list) assert_equal(0, days)
def test_diff_dates_in_days_9(self): """diff_dates_in_days: test con menos argumentos de los necesarios para que salte excepcion""" d1 = '2017/01/01' test_list = list() test_list.append(d1) op.diff_dates_in_days(test_list)