code: def test_database_list_respects_view_database():
      with make_app_client(
          config={"databases": {"fixtures": {"allow": {"id": "root"}}}},
          extra_databases={"data.db": "create table names (name text)"},
      ) as client:
          anon_response = client.get("/")
          assert '<a href="/data">data</a></h2>' in anon_response.text
          assert (
              '<a href="/fixtures">fixtures</a>'
              not in anon_response.text
          )
          auth_response = client.get(
              "/",
              cookies={"ds_actor": client.actor_cookie({"id": "root"})},
          )
          assert '<a href="/data">data</a></h2>' in auth_response.text
          assert (
              '<a href="/fixtures">fixtures</a> 🔒</h2>'
              in auth_response.text
          )
  
imports: import collections
  from datasette.app import Datasette
  from datasette.cli import cli
  from datasette.default_permissions import restrictions_allow_action
  from .fixtures import app_client, assert_permissions_checked, make_app_client
  from click.testing import CliRunner
  from bs4 import BeautifulSoup
  import copy
  import json
  from pprint import pprint
  import pytest_asyncio
  import pytest
  import re
  import time
  import urllib
label_desc: Use image node_id 4 for calling a global function with example usage: test_database_list_respects_view_database() without return types