Пример #1
0
    def test_is_valid_time__valid_time(self):
        time_splits = ['0', '120']
        result = bot.is_valid_time(time_splits)
        self.assertTrue(result)

        time_splits = ['12']
        result = bot.is_valid_time(time_splits)
        self.assertTrue(result)

        time_splits = ['1', '69', '420']
        result = bot.is_valid_time(time_splits)
        self.assertTrue(result)
Пример #2
0
 def test_is_valid_time__letters(self):
     time_splits = ['asdf', 'fds']
     result = bot.is_valid_time(time_splits)
     self.assertFalse(result)
Пример #3
0
 def test_is_valid_time__fractional_time(self):
     time_splits = ['1.2']
     result = bot.is_valid_time(time_splits)
     self.assertFalse(result)
Пример #4
0
 def test_is_valid_time__too_long(self):
     time_splits = ['1', '1', '1', '1']
     result = bot.is_valid_time(time_splits)
     self.assertFalse(result)
Пример #5
0
 def test_is_valid_time__negative_time(self):
     time_splits = ['-12', '2']
     result = bot.is_valid_time(time_splits)
     self.assertFalse(result)