@@ -160,10 +160,10 @@ def test_sim_sir():
160
160
161
161
def test_new_admissions_chart ():
162
162
projection_admits = pd .read_csv ('tests/projection_admits.csv' )
163
- chart = new_admissions_chart (alt , projection_admits , 60 - 10 )
163
+ chart = new_admissions_chart (alt , projection_admits , PARAM )
164
164
assert isinstance (chart , alt .Chart )
165
- assert chart .data .iloc [1 ].Hospitalized < 1
166
- assert round (chart .data .iloc [40 ].ICU , 0 ) == 25
165
+ assert chart .data .iloc [1 ].hosp < 1
166
+ assert round (chart .data .iloc [40 ].icu , 0 ) == 25
167
167
168
168
# test fx call with no params
169
169
with pytest .raises (TypeError ):
@@ -175,16 +175,16 @@ def test_new_admissions_chart():
175
175
176
176
def test_admitted_patients_chart ():
177
177
census_df = pd .read_csv ('tests/census_df.csv' )
178
- chart = admitted_patients_chart (alt , census_df , 60 - 10 )
178
+ chart = admitted_patients_chart (alt , census_df , PARAM )
179
179
assert isinstance (chart , alt .Chart )
180
- assert chart .data .iloc [1 ][ 'Hospital Census' ] == 1
181
- assert chart .data .iloc [49 ][ 'Ventilated Census' ] == 203
180
+ assert chart .data .iloc [1 ]. hosp == 1
181
+ assert chart .data .iloc [49 ]. vent == 203
182
182
183
183
# test fx call with no params
184
184
with pytest .raises (TypeError ):
185
185
admitted_patients_chart ()
186
186
187
- empty_chart = admitted_patients_chart (alt , pd .DataFrame (), - 1 )
187
+ empty_chart = admitted_patients_chart (alt , pd .DataFrame (), PARAM )
188
188
assert empty_chart .data .empty
189
189
190
190
0 commit comments