Skip to content

Commit 2a40b7a

Browse files
fixing tests
1 parent f68257a commit 2a40b7a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/test_app.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
"""Tests."""
22

3-
import pytest
4-
import pandas as pd
5-
import numpy as np
3+
import pytest # type: ignore
4+
import pandas as pd # type: ignore
5+
import numpy as np # type: ignore
66

77
from app import (projection_admits, alt)
88
from penn_chime.models import sir, sim_sir, sim_sir_df
@@ -43,7 +43,7 @@ def cleanup(self):
4343

4444
def test_penn_logo_in_header():
4545
penn_css = '<link rel="stylesheet" href="https://www1.pennmedicine.org/styles/shared/penn-medicine-header.css">'
46-
display_header(st, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
46+
display_header(st, DEFAULTS)
4747
assert len(
4848
list(filter(lambda s: penn_css in s, st.render_store))
4949
), "The Penn Medicine header should be printed"
@@ -65,7 +65,7 @@ def test_header_fail():
6565
Just proving to myself that these tests work
6666
"""
6767
some_garbage = "ajskhlaeHFPIQONOI8QH34TRNAOP8ESYAW4"
68-
display_header(st, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
68+
display_header(st, DEFAULTS)
6969
assert len(
7070
list(filter(lambda s: some_garbage in s, st.render_store))
7171
), "This should fail"
@@ -152,7 +152,7 @@ def test_sim_sir_df():
152152
Rounding to move fast past decimal place issues
153153
"""
154154

155-
df = sim_sir_df(5, 6, 7, 0.1, 0.1, 40)
155+
df = sim_sir_df(DEFAULTS)
156156
first = df.iloc[0]
157157
last = df.iloc[-1]
158158
assert round(first[0], 0) == 5
@@ -164,7 +164,7 @@ def test_sim_sir_df():
164164

165165

166166
def test_new_admissions_chart():
167-
chart = new_admissions_chart(alt, projection_admits, 60 - 10)
167+
chart = new_admissions_chart(alt, projection_admits, DEFAULTS)
168168
assert isinstance(chart, alt.Chart)
169169
assert chart.data.iloc[1].Hospitalized < 1
170170
# assert round(chart.data.iloc[49].ICU, 0) == 43

0 commit comments

Comments
 (0)