docstr: SavedQuery API: Test distinct schemas
code: def test_distinct_saved_query(self):
      """
      SavedQuery API: Test distinct schemas
      """
      admin = self.get_user("admin")
      saved_queries = (
          db.session.query(SavedQuery)
          .filter(SavedQuery.created_by == admin)
          .all()
      )
  
      self.login(username="admin")
      uri = f"api/v1/saved_query/distinct/schema"
      rv = self.client.get(uri)
      assert rv.status_code == 200
      data = json.loads(rv.data.decode("utf-8"))
      expected_response = {
          "count": len(saved_queries),
          "result": [
              {"text": f"schema{i}", "value": f"schema{i}"}
              for i in range(len(saved_queries))
          ],
      }
      assert data == expected_response
  
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 19 for calling the TestSavedQueryApi obj's underlying member method code with example usage: obj.test_distinct_saved_query() without return types