add test for present_intervals

This commit is contained in:
markus 2020-11-05 16:17:52 +01:00
parent a28227e7ac
commit f896cbf094

View file

@ -23,3 +23,15 @@ def test_ventilation(baseline_form):
ventilation = baseline_form.ventilation()
# TODO:
# assert ventilation == cara.models.Ventilation()
def test_present_intervals(baseline_form):
baseline_form.coffee_duration = 15
baseline_form.coffee_option = True
baseline_form.coffee_breaks = 4
baseline_form.activity_start = 9 * 60
baseline_form.activity_finish = 17 * 60
baseline_form.lunch_start = 12 * 60 + 30
baseline_form.lunch_finish = 13 * 60 + 30
correct = ((9, 10), (10.25, 12), (12.25, 12.5), (13.5, 14), (14.25, 16), (16.25, 17))
assert baseline_form.present_interval().present_times == correct