11
11
from penn_chime .charts import new_admissions_chart
12
12
from penn_chime .settings import DEFAULTS
13
13
from penn_chime .defaults import RateLos
14
-
14
+ PARAM = Parameters (
15
+ current_hospitalized = 100 ,
16
+ doubling_time = 6.0 ,
17
+ known_infected = 5000 ,
18
+ market_share = 0.05 ,
19
+ relative_contact_rate = 0.15 ,
20
+ susceptible = 500000 ,
21
+ hospitalized = RateLos (0.05 , 7 ),
22
+ icu = RateLos (0.02 , 9 ),
23
+ ventilated = RateLos (0.01 , 10 ),
24
+ n_days = 60
25
+ )
15
26
16
27
# set up
17
28
@@ -43,7 +54,7 @@ def cleanup(self):
43
54
44
55
def test_penn_logo_in_header ():
45
56
penn_css = '<link rel="stylesheet" href="https://www1.pennmedicine.org/styles/shared/penn-medicine-header.css">'
46
- display_header (st , DEFAULTS )
57
+ display_header (st , PARAM )
47
58
assert len (
48
59
list (filter (lambda s : penn_css in s , st .render_store ))
49
60
), "The Penn Medicine header should be printed"
@@ -152,7 +163,7 @@ def test_sim_sir_df():
152
163
Rounding to move fast past decimal place issues
153
164
"""
154
165
155
- df = sim_sir_df (DEFAULTS )
166
+ df = sim_sir_df (PARAM )
156
167
first = df .iloc [0 ]
157
168
last = df .iloc [- 1 ]
158
169
assert round (first [0 ], 0 ) == 5
@@ -164,7 +175,7 @@ def test_sim_sir_df():
164
175
165
176
166
177
def test_new_admissions_chart ():
167
- chart = new_admissions_chart (alt , projection_admits , DEFAULTS )
178
+ chart = new_admissions_chart (alt , projection_admits , PARAM )
168
179
assert isinstance (chart , alt .Chart )
169
180
assert chart .data .iloc [1 ].Hospitalized < 1
170
181
# assert round(chart.data.iloc[49].ICU, 0) == 43
0 commit comments