def test_process_records(mock_dag_run, mock_file_system):
    airflow_path = mock_file_system[0]
    tmp = mock_file_system[5]
    results_dir = mock_file_system[3]
    results_file = (results_dir / 'folio_instances-manual_2022-02-24.json')
    results_file.write_text('{"id": "de09e01a-6d75-4007-b700-c83a475999b1"}\n    {"id": "123326dd-9924-498f-9ca3-4fa00dda6c90"}')
    num_records = process_records(prefix='folio_instances', out_filename='instances', jobs=1, dag_run=mock_dag_run, airflow=str(airflow_path), tmp=str(tmp))
    assert (num_records == 2)
def test_process_records(mock_dag_run, mock_file_system):
    airflow_path = mock_file_system[0]
    tmp = mock_file_system[5]
    results_dir = mock_file_system[3]
    results_file = (results_dir / 'folio_instances-manual_2022-02-24.json')
    results_file.write_text('{"id": "de09e01a-6d75-4007-b700-c83a475999b1"}\n    {"id": "123326dd-9924-498f-9ca3-4fa00dda6c90"}')
    num_records = process_records(prefix='folio_instances', out_filename='instances', jobs=1, dag_run=mock_dag_run, airflow=str(airflow_path), tmp=str(tmp))
    assert (num_records == 2)