docstr: sql-via-http:
  'create database' for each db
  'drop database' for each db
  'create database' for each db
docstr_tok: ["sql-via-http",":","'create","database","'","for","each","db","'drop","database","'","for","each","db","'create","database","'","for","each","db"]
code: def test_sql_create_database(self, db, subtests):
      """sql-via-http:
      'create database' for each db
      'drop database' for each db
      'create database' for each db
      """
      db_data = getattr(self, db)
      db_type = db_data["type"]
      db_creds = db_data["connection_data"]
      queries = [
          {"create": "CREATE DATABASE", "drop": "DROP DATABASE"},
          {"create": "CREATE DATABASE", "drop": None},
      ]
      created_db_names = []
      for query in queries:
          create_query = query["create"]
          drop_query = query["drop"]
          db_name = db_type.upper()
          created_db_names.append(db_name)
          with subtests.test(
              msg=f"{db_type}",
              create_query=create_query,
              drop_query=drop_query,
              db_name=db_name,
          ):
              query = f"""
                      {create_query} {db_name}
                      WITH ENGINE = '{db_type}',
                      PARAMETERS = {json.dumps(db_creds)};
                  """
              self.sql_via_http(query, RESPONSE_TYPE.OK)
              assert db_name in self.show_databases()
              if drop_query is not None:
                  self.sql_via_http(
                      f"{drop_query} {db_name}", RESPONSE_TYPE.OK
                  )
                  assert db_name.upper() not in self.show_databases()
  
      resp = self.sql_via_http("show databases", RESPONSE_TYPE.TABLE)
      db_names = [x[0] for x in resp["data"]]
      for name in created_db_names:
          assert name in db_names
  
imports: from pathlib import Path
  import json
  import requests
  import pandas
  import pytest
  from mindsdb.api.executor.data_types.response_type import RESPONSE_TYPE
  from .conftest import make_test_csv
  from .http_test_helpers import HTTPHelperMixin
label_desc: Use image node_id 12 for calling the TestHTTP obj's underlying member method code with example usage: obj.test_sql_create_database(db, subtests) without return types