Esempio n. 1
0
def test_download_data():
    with prefect.context(today=datetime.today().strftime('%Y-%m-%d')):
        new_state = TaskRunner(
            task=socrata.download_dataset).get_task_run_state(
                state=Running(),
                inputs={
                    "dataset": Result("rq3b-xjk8"),
                    "since": Result(parse('2020-09-21', tz=None))
                })
        assert new_state.is_successful()
Esempio n. 2
0
def test_load_datafile():
    new_state = TaskRunner(task=postgres.load_datafile).get_task_run_state(
        state=Running(), inputs={"datafile": Result("rq3b-xjk8-full.csv")})
    assert new_state.is_successful()