code: def test_renew_from_kt_without_workaround(
      self, mock_subprocess, caplog
  ):
      mock_subprocess.Popen.return_value.__enter__.return_value.returncode = (
          0
      )
      mock_subprocess.call.return_value = 0
  
      with caplog.at_level(logging.INFO, logger=kerberos.log.name):
          caplog.clear()
          renew_from_kt(principal="test-principal", keytab="keytab")
          assert caplog.messages == [
              "Re-initialising kerberos from keytab: "
              "kinit -f -a -r 3600m -k -t keytab -c /tmp/airflow_krb5_ccache test-principal"
          ]
  
      assert mock_subprocess.mock_calls == [
          mock.call.Popen(
              [
                  "kinit",
                  "-f",
                  "-a",
                  "-r",
                  "3600m",
                  "-k",
                  "-t",
                  "keytab",
                  "-c",
                  "/tmp/airflow_krb5_ccache",
                  "test-principal",
              ],
              bufsize=-1,
              close_fds=True,
              stderr=mock_subprocess.PIPE,
              stdout=mock_subprocess.PIPE,
              universal_newlines=True,
          ),
          mock.call.Popen().__enter__(),
          mock.call.Popen().__enter__().wait(),
          mock.call.Popen().__exit__(None, None, None),
      ]
  
file_path: airflow/tests/security/test_kerberos.py
imports: from __future__ import annotations
  import logging
  import shlex
  from unittest import mock
  import pytest
  from airflow.security import kerberos
  from airflow.security.kerberos import get_kerberos_principle, renew_from_kt
  from tests.test_utils.config import conf_vars
label_desc: Use image node_id 2 for calling the TestKerberos obj's underlying member method code with example usage: obj.test_renew_from_kt_without_workaround(mock_subprocess, caplog) without return types