def test_post_to_okapi_failures(mock_okapi_failure, mock_okapi_variable, mock_dag_run, mock_records, mock_file_system):
    airflow_path = mock_file_system[0]
    migration_results = mock_file_system[3]
    post_to_okapi(token='2345asdf', dag_run=mock_dag_run, records=mock_records, endpoint='/instance-storage/batch/synchronous', payload_key='instances', airflow=airflow_path)
    error_file = (migration_results / 'errors-instance-storage-422-manual_2022-02-24.json')
    assert error_file.exists()
def test_post_to_okapi_failures(mock_okapi_failure, mock_okapi_variable, mock_dag_run, mock_records, mock_file_system):
    airflow_path = mock_file_system[0]
    migration_results = mock_file_system[3]
    post_to_okapi(token='2345asdf', dag_run=mock_dag_run, records=mock_records, endpoint='/instance-storage/batch/synchronous', payload_key='instances', airflow=airflow_path)
    error_file = (migration_results / 'errors-instance-storage-422-manual_2022-02-24.json')
    assert error_file.exists()