docstr: Saved Query API: Test create
code: def test_create_saved_query(self):
      """
      Saved Query API: Test create
      """
      admin = self.get_user("admin")
      example_db = get_example_database()
  
      post_data = {
          "schema": "schema1",
          "label": "label1",
          "description": "some description",
          "sql": "SELECT col1, col2 from table1",
          "db_id": example_db.id,
      }
  
      self.login(username="admin")
      uri = f"api/v1/saved_query/"
      rv = self.client.post(uri, json=post_data)
      data = json.loads(rv.data.decode("utf-8"))
      assert rv.status_code == 201
  
      saved_query_id = data.get("id")
      model = db.session.query(SavedQuery).get(saved_query_id)
      for key in post_data:
          assert getattr(model, key) == data["result"][key]
  
      # Rollback changes
      db.session.delete(model)
      db.session.commit()
  
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 23 for calling the TestSavedQueryApi obj's underlying member method code with example usage: obj.test_create_saved_query() without return types