docstr: Query API: Test get list query
docstr_tok: ["Query","API",":","Test","get","list","query"]
code: def test_get_list_query(self):
      """
      Query API: Test get list query
      """
      self.login(username="admin")
      uri = "api/v1/query/"
      rv = self.client.get(uri)
      self.assertEqual(rv.status_code, 200)
      data = json.loads(rv.data.decode("utf-8"))
      assert data["count"] == QUERIES_FIXTURE_COUNT
      # check expected columns
      assert sorted(list(data["result"][0].keys())) == [
          "changed_on",
          "database",
          "end_time",
          "executed_sql",
          "id",
          "rows",
          "schema",
          "sql",
          "sql_tables",
          "start_time",
          "status",
          "tab_name",
          "tmp_table_name",
          "tracking_url",
          "user",
      ]
      assert sorted(list(data["result"][0]["user"].keys())) == [
          "first_name",
          "id",
          "last_name",
      ]
      assert list(data["result"][0]["database"].keys()) == [
          "database_name",
      ]
  
imports: from datetime import datetime, timedelta
  from unittest import mock
  import json
  import random
  import string
  import pytest
  import prison
  from sqlalchemy.sql import func
  import tests.integration_tests.test_app
  from superset import db, security_manager
  from superset.common.db_query_status import QueryStatus
  from superset.models.core import Database
  from superset.utils.database import get_example_database, get_main_database
  from superset.models.sql_lab import Query
  from tests.integration_tests.base_tests import SupersetTestCase
label_desc: Use image node_id 7 for calling the TestQueryApi obj's underlying member method code with example usage: obj.test_get_list_query() without return types