code: def test_allow_facet_off():
      with make_app_client(settings={"allow_facet": False}) as client:
          assert (
              client.get(
                  "/fixtures/facetable.json?_facet=planet_int&_extra=suggested_facets"
              ).status
              == 400
          )
          data = client.get(
              "/fixtures/facetable.json?_extra=suggested_facets"
          ).json
          # Should not suggest any facets either:
          assert [] == data["suggested_facets"]
  
file_path: datasette/tests/test_table_api.py
imports: from datasette.utils import detect_json1
  from datasette.utils.sqlite import sqlite_version
  from .fixtures import app_client, app_client_with_trace, app_client_returned_rows_matches_page_size, generate_compound_rows, generate_sortable_rows, make_app_client
  import json
  import pytest
  import urllib
label_desc: Use image node_id 4 for calling a global function with example usage: test_allow_facet_off() without return types