code: def test_lightning_run_app_enable_basic_auth_passed(
      mock_dispatch: mock.MagicMock, caplog, monkeypatch
  ):
      """This test just validates the command has ran properly when --enable-basic-auth argument is passed.
  
      It checks the call to `dispatch` for the right arguments.
  
      """
      monkeypatch.setattr(
          "lightning.app.runners.cloud.logger", logging.getLogger()
      )
  
      with caplog.at_level(logging.INFO):
          _run_app(
              file=os.path.join(
                  _PROJECT_ROOT,
                  "tests/tests_app/core/scripts/app_metadata.py",
              ),
              cloud=True,
              without_server=False,
              name="",
              blocking=False,
              open_ui=False,
              no_cache=True,
              env=("FOO=bar",),
              secret=("BAR=my-secret",),
              run_app_comment_commands=False,
              enable_basic_auth="username:password",
          )
  
          # Get the designated port
          port = constants.APP_SERVER_PORT
  
      mock_dispatch.assert_called_with(
          Path(
              os.path.join(
                  _PROJECT_ROOT,
                  "tests/tests_app/core/scripts/app_metadata.py",
              )
          ),
          RuntimeType.CLOUD,
          start_server=True,
          blocking=False,
          open_ui=False,
          name="",
          no_cache=True,
          env_vars={"FOO": "bar"},
          secrets={"BAR": "my-secret"},
          run_app_comment_commands=False,
          enable_basic_auth="username:password",
          port=port,
      )
  
file_path: pytorch-lightning/tests/tests_app/cli/test_run_app.py
imports: import logging
  import os
  from pathlib import Path
  from unittest import mock
  import click
  import lightning.app.core.constants
  import pytest
  from click.testing import CliRunner
  from lightning.app import LightningApp
  from lightning.app.cli.lightning_cli import _run_app, run_app
  from lightning.app.runners.runtime_type import RuntimeType
  from lightning.app.utilities.app_helpers import convert_print_to_logger_info
  from tests_app import _PROJECT_ROOT
label_desc: Use image node_id 5 for calling a global function with example usage: test_lightning_run_app_enable_basic_auth_passed(mock_dispatch, caplog, monkeypatch) without return types