j40-cejst-2/data/data-pipeline/data_pipeline/etl/tests/test_etl.py
Nat Hillard ec19d86f6f
Adding back census to list of potential datasets, but separating out from standard list (#484)
Error this addresses:
  File "/Users/lucas/Documents/usds/repos/justice40-tool/data/data-pipeline/data_pipeline/etl/runner.py", line 71, in etl_runner
    f"data_pipeline.etl.sources.{dataset['module_dir']}.etl"
TypeError: 'NoneType' object is not subscriptable
2021-08-09 09:52:06 -04:00

9 lines
328 B
Python

import pytest
from data_pipeline.etl import constants, runner
def test_get_datasets_to_run():
assert runner.get_datasets_to_run(None) == constants.DATASET_LIST
assert runner.get_datasets_to_run("census") == [constants.CENSUS_INFO]
with pytest.raises(ValueError):
runner.get_datasets_to_run("doesnt_exist")