code: def test_no_files_uses_memory_database(app_client_no_files):
      response = app_client_no_files.get("/.json")
      assert response.status == 200
      assert {
          "_memory": {
              "name": "_memory",
              "hash": None,
              "color": "a6c7b9",
              "path": "/_memory",
              "tables_and_views_truncated": [],
              "tables_and_views_more": False,
              "tables_count": 0,
              "table_rows_sum": 0,
              "show_table_row_counts": False,
              "hidden_table_rows_sum": 0,
              "hidden_tables_count": 0,
              "views_count": 0,
              "private": False,
          }
      } == response.json
      # Try that SQL query
      response = app_client_no_files.get(
          "/_memory.json?sql=select+sqlite_version()&_shape=array"
      )
      assert 1 == len(response.json)
      assert ["sqlite_version()"] == list(response.json[0].keys())
  
file_path: datasette/tests/test_api.py
imports: from datasette.app import Datasette
  from datasette.plugins import DEFAULT_PLUGINS
  from datasette.utils.sqlite import supports_table_xinfo
  from datasette.version import __version__
  from .fixtures import app_client, app_client_no_files, app_client_with_dot, app_client_shorter_time_limit, app_client_two_attached_databases_one_immutable, app_client_larger_cache_size, app_client_with_cors, app_client_two_attached_databases, app_client_conflicting_database_names, app_client_immutable_and_inspect_file, make_app_client, EXPECTED_PLUGINS, METADATA
  import pathlib
  import pytest
  import sys
  import urllib
label_desc: Use image node_id 1 for calling a global function with example usage: test_no_files_uses_memory_database(app_client_no_files) without return types