diff --git a/cara/tests/apps/calculator/test_model_generator.py b/cara/tests/apps/calculator/test_model_generator.py index 05203273..a13018cc 100644 --- a/cara/tests/apps/calculator/test_model_generator.py +++ b/cara/tests/apps/calculator/test_model_generator.py @@ -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