code: def test_write_temp_file(self, tmp_path):
      csv_path = tmp_path / "testfile.csv"
      task_id = "some_test_id"
      sql = "some_sql"
      sql_params = {":p_data": "2018-01-01"}
      oracle_conn_id = "oracle_conn_id"
      azure_data_lake_conn_id = "azure_data_lake_conn_id"
      azure_data_lake_path = "azure_data_lake_path"
      delimiter = "|"
      encoding = "utf-8"
      cursor_description = [
          ("id", "<class 'oracledb.NUMBER'>", 39, None, 38, 0, 0),
          (
              "description",
              "<class 'oracledb.STRING'>",
              60,
              240,
              None,
              None,
              1,
          ),
      ]
      cursor_rows = [[1, "description 1"], [2, "description 2"]]
      mock_cursor = MagicMock()
      mock_cursor.description = cursor_description
      mock_cursor.__iter__.return_value = cursor_rows
  
      op = OracleToAzureDataLakeOperator(
          task_id=task_id,
          filename=csv_path.name,
          oracle_conn_id=oracle_conn_id,
          sql=sql,
          sql_params=sql_params,
          azure_data_lake_conn_id=azure_data_lake_conn_id,
          azure_data_lake_path=azure_data_lake_path,
          delimiter=delimiter,
          encoding=encoding,
      )
  
      op._write_temp_file(mock_cursor, os.fspath(csv_path))
      assert csv_path.exists()
  
      with csv_path.open() as f:
          csvr = csv.reader(f, delimiter=delimiter)
          header = next(csvr)
          assert header[0] == "id"
          assert header[1] == "description"
          for csv_rec, exp_rec in zip(csvr, cursor_rows):
              assert csv_rec[0] == str(exp_rec[0])
              assert csv_rec[1] == exp_rec[1]
  
file_path: airflow/tests/providers/microsoft/azure/transfers/test_oracle_to_azure_data_lake.py
imports: from __future__ import annotations
  import csv
  import os
  from unittest import mock
  from unittest.mock import MagicMock
  from airflow.providers.microsoft.azure.transfers.oracle_to_azure_data_lake import OracleToAzureDataLakeOperator
label_desc: Use image node_id 1 for calling the TestOracleToAzureDataLakeTransfer obj's underlying member method code with example usage: obj.test_write_temp_file(tmp_path) without return types