Skip to content

Commit 58d2b2b

Browse files
committed
Add integration tests
1 parent 2b2d0e5 commit 58d2b2b

File tree

15 files changed

+55
-5
lines changed

15 files changed

+55
-5
lines changed

docs/epidata_development.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,11 @@ All 48 tests passed! 68% (490/711) coverage.
145145

146146
You can also run tests using pytest like this:
147147
```
148-
docker run --rm delphi_python pytest repos/delphi/delphi-epidata/tests/
148+
docker run --rm delphi_python pytest repos/delphi/delphi-epidata/tests/
149149
```
150150
and with pdb enabled like this:
151151
```
152-
docker run -it --rm delphi_python pytest repos/delphi/delphi-epidata/tests/ --pdb
152+
docker run -it --rm delphi_python pytest repos/delphi/delphi-epidata/tests/ --pdb
153153
```
154154

155155
## manual tests
@@ -293,6 +293,15 @@ More concretely, you can run Epidata API integration tests like this:
293293
✔ All 3 tests passed! [coverage unavailable]
294294
```
295295

296+
You can also run tests using pytest like this:
297+
```
298+
docker run --network delphi-net --rm delphi_python pytest repos/delphi/delphi-epidata/integrations/
299+
```
300+
and with pdb enabled like this:
301+
```
302+
docker run --network delphi-net -it --rm delphi_python pytest repos/delphi/delphi-epidata/integrations/ --pdb
303+
```
304+
296305
5. Bring down the servers, for example with the `docker stop` command.
297306

298307
# rapid iteration

docs/new_endpoint_tutorial.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,11 +269,11 @@ If all succeeds, output should look like this:
269269

270270
You can also run tests using pytest like this:
271271
```
272-
docker run --rm delphi_python pytest repos/delphi/delphi-epidata/tests/
272+
docker run --rm delphi_python pytest repos/delphi/delphi-epidata/tests/
273273
```
274274
and with pdb enabled like this:
275275
```
276-
docker run -it --rm delphi_python pytest repos/delphi/delphi-epidata/tests/ --pdb
276+
docker run -it --rm delphi_python pytest repos/delphi/delphi-epidata/tests/ --pdb
277277
```
278278

279279
## integration
@@ -326,6 +326,14 @@ delphi.delphi-epidata.integrations.server.test_fluview_meta.FluviewMetaTests.tes
326326
327327
✔ All 16 tests passed! 48% (180/372) coverage.
328328
```
329+
You can also run tests using pytest like this:
330+
```
331+
docker run --network delphi-net --rm delphi_python pytest repos/delphi/delphi-epidata/integrations/
332+
```
333+
and with pdb enabled like this:
334+
```
335+
docker run --network delphi-net -it --rm delphi_python pytest repos/delphi/delphi-epidata/integrations/ --pdb
336+
```
329337

330338
# code review and submission
331339

integrations/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import sys
2+
import os
3+
4+
sys.path.append(os.getcwd())
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import sys
2+
import os
3+
4+
sys.path.append(os.getcwd())

integrations/acquisition/covid_hosp/facility/test_scenarios.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from delphi.epidata.acquisition.covid_hosp.common.database import Database
99
from delphi.epidata.acquisition.covid_hosp.common.test_utils import TestUtils
1010
from delphi.epidata.client.delphi_epidata import Epidata
11+
from delphi.epidata.acquisition.covid_hosp.facility.update import Update
1112
import delphi.operations.secrets as secrets
1213

1314
# py3tester coverage target (equivalent to `import *`)
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import sys
2+
import os
3+
4+
sys.path.append(os.getcwd())

integrations/acquisition/covid_hosp/state_timeseries/test_scenarios.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from delphi.epidata.acquisition.covid_hosp.common.database import Database
99
from delphi.epidata.acquisition.covid_hosp.common.test_utils import TestUtils
1010
from delphi.epidata.client.delphi_epidata import Epidata
11+
from delphi.epidata.acquisition.covid_hosp.state_timeseries.update import Update
1112
import delphi.operations.secrets as secrets
1213

1314
# py3tester coverage target (equivalent to `import *`)
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import sys
2+
import os
3+
4+
sys.path.append(os.getcwd())

integrations/acquisition/covidcast/test_covidcast_meta_caching.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from delphi.epidata.client.delphi_epidata import Epidata
1313
import delphi.operations.secrets as secrets
1414
import delphi.epidata.acquisition.covidcast.database as live
15+
from delphi.epidata.acquisition.covidcast.covidcast_meta_cache_updater import main
1516

1617
# py3tester coverage target (equivalent to `import *`)
1718
__test_target__ = (

integrations/acquisition/covidcast/test_csv_uploading.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
# first party
1313
from delphi.epidata.client.delphi_epidata import Epidata
14+
from delphi.epidata.acquisition.covidcast.csv_to_database import main
1415
import delphi.operations.secrets as secrets
1516

1617
# py3tester coverage target (equivalent to `import *`)

0 commit comments

Comments
 (0)