code: def test_flask_spec_output(app, cli_runner, tmp_path):
      local_spec_path = tmp_path / "openapi.json"
      result = cli_runner.invoke(
          spec_command, ["--output", str(local_spec_path)]
      )
      assert "openapi" in result.output
      with open(local_spec_path) as f:
          assert json.loads(f.read()) == app.spec
  
file_path: apiflask/tests/test_commands.py
imports: import json
  import pytest
  from .schemas import Foo
  from apiflask.commands import spec_command
label_desc: Use image node_id 2 for calling a global function with example usage: test_flask_spec_output(app, cli_runner, tmp_path) without return types