code: def test_package_with_port(mock_call, mock_which, tmp_path_factory):
      mock_which.return_value = True
      capture = CaptureDockerfile()
      mock_call.side_effect = capture
      runner = CliRunner()
      os.chdir(tmp_path_factory.mktemp("runner"))
      with open("test.db", "w") as fp:
          fp.write("data")
      result = runner.invoke(
          cli.cli,
          ["package", "test.db", "-p", "8080", "--secret", "sekrit"],
      )
      assert 0 == result.exit_code
      assert EXPECTED_DOCKERFILE.format(port=8080) == capture.captured
  
file_path: datasette/tests/test_package.py
imports: from click.testing import CliRunner
  from datasette import cli
  from unittest import mock
  import os
  import pathlib
  import pytest
label_desc: Use image node_id 2 for calling a global function with example usage: test_package_with_port(mock_call, mock_which, tmp_path_factory) without return types