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)
def test_is_valid_time__letters(self): time_splits = ['asdf', 'fds'] result = bot.is_valid_time(time_splits) self.assertFalse(result)
def test_is_valid_time__fractional_time(self): time_splits = ['1.2'] result = bot.is_valid_time(time_splits) self.assertFalse(result)
def test_is_valid_time__too_long(self): time_splits = ['1', '1', '1', '1'] result = bot.is_valid_time(time_splits) self.assertFalse(result)
def test_is_valid_time__negative_time(self): time_splits = ['-12', '2'] result = bot.is_valid_time(time_splits) self.assertFalse(result)