code: def test_table_cell_truncation():
      with make_app_client(
          settings={"truncate_cells_html": 5}
      ) as client:
          response = client.get("/fixtures/facetable")
          assert response.status == 200
          table = Soup(response.body, "html.parser").find("table")
          assert table["class"] == ["rows-and-columns"]
          assert [
              "Missi…",
              "Dogpa…",
              "SOMA",
              "Tende…",
              "Berna…",
              "Hayes…",
              "Holly…",
              "Downt…",
              "Los F…",
              "Korea…",
              "Downt…",
              "Greek…",
              "Corkt…",
              "Mexic…",
              "Arcad…",
          ] == [
              td.string
              for td in table.findAll(
                  "td", {"class": "col-neighborhood-b352a7"}
              )
          ]
          # URLs should be truncated too
          response2 = client.get("/fixtures/roadside_attractions")
          assert response2.status == 200
          table = Soup(response2.body, "html.parser").find("table")
          tds = table.findAll("td", {"class": "col-url"})
          assert [str(td) for td in tds] == [
              '<td class="col-url type-str"><a href="https://www.mysteryspot.com/">http…</a></td>',
              '<td class="col-url type-str"><a href="https://winchestermysteryhouse.com/">http…</a></td>',
              '<td class="col-url type-none">\xa0</td>',
              '<td class="col-url type-str"><a href="https://www.bigfootdiscoveryproject.com/">http…</a></td>',
          ]
  
file_path: datasette/tests/test_table_html.py
imports: from datasette.app import Datasette, Database
  from bs4 import BeautifulSoup
  from .fixtures import app_client, make_app_client
  import pathlib
  import pytest
  import urllib.parse
  from .utils import assert_footer_links, inner_html
label_desc: Use image node_id 1 for calling a global function with example usage: test_table_cell_truncation() without return types