code: def test_query_page_truncates():
      with make_app_client(
          settings={"truncate_cells_html": 5}
      ) as client:
          response = client.get(
              "/fixtures?"
              + urllib.parse.urlencode(
                  {
                      "sql": "select 'this is longer than 5' as a, 'https://example.com/' as b"
                  }
              )
          )
          assert response.status_code == 200
          table = Soup(response.content, "html.parser").find("table")
          tds = table.findAll("td")
          assert [str(td) for td in tds] == [
              '<td class="col-a">this …</td>',
              '<td class="col-b"><a href="https://example.com/">http…</a></td>',
          ]
  
imports: from bs4 import BeautifulSoup
  from datasette.utils import allowed_pragmas
  from .fixtures import app_client, app_client_base_url_prefix, app_client_shorter_time_limit, app_client_two_attached_databases, make_app_client, METADATA
  from .utils import assert_footer_links, inner_html
  import copy
  import json
  import pathlib
  import pytest
  import re
  import urllib.parse
label_desc: Use image node_id 7 for calling a global function with example usage: test_query_page_truncates() without return types