Beispiel #1
0
def test__get_smartd_schedule_piece__every_specific_month():
    assert get_smartd_schedule_piece("1,5,11", 1, 12) == "(01|05|11)"
Beispiel #2
0
def test__get_smartd_schedule_piece__every_day_of_week():
    assert get_smartd_schedule_piece("1,2,3,4,5,6,7", 1, 7) == "."
Beispiel #3
0
def test__get_smartd_schedule_piece__every_each_month():
    assert get_smartd_schedule_piece("*/1", 1, 12) == ".."
Beispiel #4
0
def test__get_smartd_schedule_piece__every_fifth_month():
    assert get_smartd_schedule_piece("*/5", 1, 12) == "(05|10)"
Beispiel #5
0
def test__get_smartd_schedule_piece__every_fifth_month():
    assert get_smartd_schedule_piece("*/5", 1, 12) == "(05|10)"
Beispiel #6
0
def test__get_smartd_schedule_piece__at_midnight():
    assert get_smartd_schedule_piece("0", 1, 23) == "(00)"
Beispiel #7
0
def test__get_smartd_schedule_piece__every_day_of_week():
    assert get_smartd_schedule_piece("1,2,3,4,5,6,7", 1, 7) == "."
Beispiel #8
0
def test__get_smartd_schedule_piece__every_month():
    assert get_smartd_schedule_piece("1,2,3,4,5,6,7,8,9,10,11,12", 1, 12) == ".."
Beispiel #9
0
def test__get_smartd_schedule_piece__at_midnight():
    assert get_smartd_schedule_piece("0", 1, 23) == "(00)"
Beispiel #10
0
def test__get_smartd_schedule_piece__range_with_divisor():
    assert get_smartd_schedule_piece("3-30/10", 1, 31) == "(10|20|30)"
Beispiel #11
0
def test__get_smartd_schedule_piece__specific_day_of_week():
    assert get_smartd_schedule_piece("1,2,3", 1, 7) == "(1|2|3)"
Beispiel #12
0
def test__get_smartd_schedule_piece__malformed_range_without_divisor():
    assert get_smartd_schedule_piece("10-1", 1, 31) == "(10)"
Beispiel #13
0
def test__get_smartd_schedule_piece__range_without_divisor():
    assert get_smartd_schedule_piece("10-15", 1, 31) == "(10|11|12|13|14|15)"
Beispiel #14
0
def test__get_smartd_schedule_piece__every_day_of_week_wildcard():
    assert get_smartd_schedule_piece("*", 1, 7) == "."
Beispiel #15
0
def test__get_smartd_schedule_piece__every_day_of_week_wildcard():
    assert get_smartd_schedule_piece("*", 1, 7) == "."
Beispiel #16
0
def test__get_smartd_schedule_piece__every_each_month_wildcard():
    assert get_smartd_schedule_piece("*", 1, 12) == ".."
Beispiel #17
0
def test__get_smartd_schedule_piece__every_month():
    assert get_smartd_schedule_piece("1,2,3,4,5,6,7,8,9,10,11,12", 1, 12) == ".."
Beispiel #18
0
def test__get_smartd_schedule_piece__every_each_month():
    assert get_smartd_schedule_piece("*/1", 1, 12) == ".."
Beispiel #19
0
def test__get_smartd_schedule_piece__every_each_month_wildcard():
    assert get_smartd_schedule_piece("*", 1, 12) == ".."
Beispiel #20
0
def test__get_smartd_schedule_piece__every_specific_month():
    assert get_smartd_schedule_piece("1,5,11", 1, 12) == "(01|05|11)"
Beispiel #21
0
def test__get_smartd_schedule_piece__specific_day_of_week():
    assert get_smartd_schedule_piece("1,2,3", 1, 7) == "(1|2|3)"