code: def test_plugins_cli(app_client):
      runner = CliRunner()
      result1 = runner.invoke(cli, ["plugins"])
      assert json.loads(result1.output) == EXPECTED_PLUGINS
      # Try with --all
      result2 = runner.invoke(cli, ["plugins", "--all"])
      names = [p["name"] for p in json.loads(result2.output)]
      # Should have all the EXPECTED_PLUGINS
      assert set(names).issuperset(
          {p["name"] for p in EXPECTED_PLUGINS}
      )
      # And the following too:
      assert set(names).issuperset(DEFAULT_PLUGINS)
      # --requirements should be empty because there are no installed non-plugins-dir plugins
      result3 = runner.invoke(cli, ["plugins", "--requirements"])
      assert result3.output == ""
  
imports: from .fixtures import app_client, make_app_client, TestClient, EXPECTED_PLUGINS
  import asyncio
  from datasette.app import SETTINGS
  from datasette.plugins import DEFAULT_PLUGINS
  from datasette.cli import cli, serve
  from datasette.version import __version__
  from datasette.utils import tilde_encode
  from datasette.utils.sqlite import sqlite3
  from click.testing import CliRunner
  import io
  import json
  import pathlib
  import pytest
  import sys
  import textwrap
  from unittest import mock
  import urllib
label_desc: Use image node_id 6 for calling a global function with example usage: test_plugins_cli(app_client) without return types