def test_minimum_maximum(self): time = TimeInput() time.minimum = datetime.time(12, 14) time.maximum = datetime.time(19, 45) assert_equal('<input max="19:45:00" min="12:14:00" type="time"/>', str(time)) time.minimum = None time.maximum = None assert_equal('<input type="time"/>', str(time))
def test_minimum_maximum(self): time = TimeInput() time.minimum = datetime.time(12, 14) time.maximum = datetime.time(19, 45) assert_equal('<input max="19:45:00" min="12:14:00" type="time"/>', str(time)) time.minimum = None time.maximum = None assert_equal('<input type="time"/>', str(time))
def test_maximum_below_minimum(self): time = TimeInput() time.minimum = datetime.time(12, 1) with assert_raises(ValueError): time.maximum = datetime.time(12, 0)
def test_maximum_below_minimum(self): time = TimeInput() time.minimum = datetime.time(12, 1) with assert_raises(ValueError): time.maximum = datetime.time(12, 0)