cara/caimira/tests/test_model.py
lrdossan 20b0467f89 Backend separation
- extract, isolate and package it in a completely independent Python module, versioned and in a way that allows releases on PyPI.org
- fixed error in placeholder for secondary school (data registry defaults)
- added restriction in pytest version to install
- expected number of new cases fix
- data registry update (schema v2.1.1)
- github update
- deprecate ExpertApplication and CO2Application
- changes to reflect schema update 2.0.2
- version update
- Fixed error with f_inf (short-range)
- new folder layout
- Conditional probability data update
- General fixes
- Fitting results in L/S/person
- CO2 fitting algorithm refinement
2024-09-02 17:39:46 +02:00

11 lines
589 B
Python

from caimira.calculator.models.dataclass_utils import nested_replace
def test_exposure_r0(baseline_exposure_model):
baseline_n3 = nested_replace(
baseline_exposure_model, {'concentration_model.infected.number': 3}
)
# The number of new cases should be greater if there are more infecteds, but
# the reproduction number should be the same (it is a measure of one infected case).
assert baseline_n3.expected_new_cases() > baseline_exposure_model.expected_new_cases()
assert baseline_n3.reproduction_number() == baseline_exposure_model.reproduction_number()