diff --git a/caimira/apps/templates/base/calculator.form.html.j2 b/caimira/apps/templates/base/calculator.form.html.j2 index 563e6d0c..37d8d932 100644 --- a/caimira/apps/templates/base/calculator.form.html.j2 +++ b/caimira/apps/templates/base/calculator.form.html.j2 @@ -317,7 +317,6 @@
-
diff --git a/caimira/tests/apps/calculator/test_model_generator.py b/caimira/tests/apps/calculator/test_model_generator.py index 43c1a657..1dbb4961 100644 --- a/caimira/tests/apps/calculator/test_model_generator.py +++ b/caimira/tests/apps/calculator/test_model_generator.py @@ -167,10 +167,20 @@ def test_ventilation_window_hepa(baseline_form: model_generator.FormData): assert ventilation == baseline_vent -def test_infected_less_than_total_people(baseline_form: model_generator.FormData): - baseline_form.total_people = 10 - baseline_form.infected_people = 11 - with pytest.raises(ValueError, match='Number of infected people cannot be more than number of total people.'): +@pytest.mark.parametrize( + ["activity", "total_people", "infected_people", "error"], + [ + ['office', 10, 11, "Number of infected people cannot be more or equal than number of total people."], + ['office', 10, 10, "Number of infected people cannot be more or equal than number of total people."], + ['training', 10, 2, "Conference/Training activities are limited to 1 infected."], + ] +) +def test_infected_less_than_total_people(activity, total_people, infected_people, error, + baseline_form: model_generator.FormData): + baseline_form.activity_type = activity + baseline_form.total_people = total_people + baseline_form.infected_people = infected_people + with pytest.raises(ValueError, match=error): baseline_form.validate()