@pytest.mark.usefixtures('harvester')
def test_harvest_days_back(harvester):
    start_date = date(2015, 3, 14)
    end_date = date(2015, 3, 16)

    _, timestamps = tasks.harvest('test', 'TIME', start_date=start_date, end_date=end_date)

    keys = ['harvestFinished', 'harvestTaskCreated', 'harvestStarted']

    for key in keys:
        assert key in timestamps.keys()

    assert harvester.harvest.called
    harvester.harvest.assert_called_once_with(start_date=start_date, end_date=end_date)
dataset/ETHPy150Open CenterForOpenScience/scrapi/tests/test_tasks.py/test_harvest_days_back/original