Example #1
0
    def test_normal(self):
        n = NoticeLogic()

        assert n.set_sleep_time(31) == 60 * 10
Example #2
0
    def test_critical(self):
        n = NoticeLogic()

        assert n.set_sleep_time(19) == 2
        assert n.set_sleep_time(21) != 2
Example #3
0
    def test_warning(self):
        n = NoticeLogic()

        assert n.set_sleep_time(29) == 60 * 4
        assert n.set_sleep_time(31) != 60 * 4
Example #4
0
    def test_fatal(self):
        n = NoticeLogic()

        assert n.set_sleep_time(9) == 0
        assert n.set_sleep_time(11) != 0