docstr: CSS Template API: Test get list css template
docstr_tok: ["CSS","Template","API",":","Test","get","list","css","template"]
code: def test_get_list_css_template(self):
      """
      CSS Template API: Test get list css template
      """
      css_templates = db.session.query(CssTemplate).all()
  
      self.login(username="admin")
      uri = f"api/v1/css_template/"
      rv = self.get_assert_metric(uri, "get_list")
      assert rv.status_code == 200
      data = json.loads(rv.data.decode("utf-8"))
      assert data["count"] == len(css_templates)
      expected_columns = [
          "changed_by",
          "changed_on_delta_humanized",
          "created_by",
          "created_on",
          "css",
          "id",
          "template_name",
      ]
      result_columns = list(data["result"][0].keys())
      result_columns.sort()
      assert expected_columns == result_columns
      created_by_columns = list(data["result"][0]["created_by"].keys())
      created_by_columns.sort()
      assert ["first_name", "id", "last_name"] == created_by_columns
      changed_by_columns = list(data["result"][0]["changed_by"].keys())
      changed_by_columns.sort()
      assert ["first_name", "id", "last_name"] == changed_by_columns
  
imports: import json
  import pytest
  import prison
  from datetime import datetime
  from freezegun import freeze_time
  from sqlalchemy.sql import func
  import tests.integration_tests.test_app
  from superset import db
  from superset.models.core import CssTemplate
  from superset.utils.database import get_example_database
  from tests.integration_tests.base_tests import SupersetTestCase
label_desc: Use image node_id 3 for calling the TestCssTemplateApi obj's underlying member method code with example usage: obj.test_get_list_css_template() without return types