docstr: Saved Query API: Test get saved query
code: def test_get_saved_query(self):
      """
      Saved Query API: Test get saved query
      """
      saved_query = (
          db.session.query(SavedQuery)
          .filter(SavedQuery.label == "label1")
          .all()[0]
      )
      self.login(username="admin")
      with freeze_time(datetime.now()):
          uri = f"api/v1/saved_query/{saved_query.id}"
          rv = self.get_assert_metric(uri, "get")
          assert rv.status_code == 200
  
      expected_result = {
          "id": saved_query.id,
          "database": {
              "id": saved_query.database.id,
              "database_name": "examples",
          },
          "description": "cool description",
          "changed_by": None,
          "changed_on_delta_humanized": "now",
          "created_by": {
              "first_name": saved_query.created_by.first_name,
              "id": saved_query.created_by.id,
              "last_name": saved_query.created_by.last_name,
          },
          "sql": "SELECT col1, col2 from table1",
          "sql_tables": [
              {"catalog": None, "schema": None, "table": "table1"}
          ],
          "schema": "schema1",
          "label": "label1",
          "template_parameters": None,
      }
      data = json.loads(rv.data.decode("utf-8"))
      for key, value in data["result"].items():
          if key != "changed_on":
              assert value == expected_result[key]
  
imports: import json
  from datetime import datetime
  from io import BytesIO
  from typing import Optional
  from zipfile import is_zipfile, ZipFile
  import yaml
  import pytest
  import prison
  from freezegun import freeze_time
  from sqlalchemy.sql import func, and_
  import tests.integration_tests.test_app
  from superset import db
  from superset.models.core import Database
  from superset.models.core import FavStar
  from superset.models.sql_lab import SavedQuery
  from superset.utils.database import get_example_database
  from tests.integration_tests.base_tests import SupersetTestCase
  from tests.integration_tests.fixtures.importexport import database_config, saved_queries_config, saved_queries_metadata_config
label_desc: Use image node_id 21 for calling the TestSavedQueryApi obj's underlying member method code with example usage: obj.test_get_saved_query() without return types