code: def test_view_database(allow, expected_anon, expected_auth):
      with make_app_client(
          config={"databases": {"fixtures": {"allow": allow}}}
      ) as client:
          for path in (
              "/fixtures",
              "/fixtures/compound_three_primary_keys",
              "/fixtures/compound_three_primary_keys/a,a,a",
          ):
              anon_response = client.get(path)
              assert expected_anon == anon_response.status, path
              if (
                  allow
                  and path == "/fixtures"
                  and anon_response.status == 200
              ):
                  # Should be no padlock
                  assert ">fixtures 🔒</h1>" not in anon_response.text
              auth_response = client.get(
                  path,
                  cookies={
                      "ds_actor": client.actor_cookie({"id": "root"})
                  },
              )
              assert expected_auth == auth_response.status
              if (
                  allow
                  and path == "/fixtures"
                  and expected_anon == 403
                  and expected_auth == 200
              ):
                  assert ">fixtures 🔒</h1>" 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 3 for calling a global function with example usage: test_view_database(allow, expected_anon, expected_auth) without return types