code: def test_sql_create_predictor(self):
      resp = self.sql_via_http("show models", RESPONSE_TYPE.TABLE)
      assert len(resp["data"]) == 0
  
      self.sql_via_http(
          """
              create predictor p_test_1
              from files (select sqft, location, rental_price from test_file limit 30)
              predict rental_price
          """,
          RESPONSE_TYPE.TABLE,
      )
      status = self.await_model("p_test_1", timeout=120)
      assert status == "complete"
  
      resp = self.sql_via_http(
          """
              select * from mindsdb.p_test_1 where sqft = 1000
          """,
          RESPONSE_TYPE.TABLE,
      )
      sqft_index = resp["column_names"].index("sqft")
      rental_price_index = resp["column_names"].index("rental_price")
      assert len(resp["data"]) == 1
      assert resp["data"][0][sqft_index] == 1000
      assert resp["data"][0][rental_price_index] > 0
  
      resp = self.sql_via_http(
          """
              select * from files.small_test_file ta join mindsdb.p_test_1
          """,
          RESPONSE_TYPE.TABLE,
      )
      rental_price_index = resp["column_names"].index("rental_price")
      assert len(resp["data"]) == 5
      # FIXME rental price is str instead of float
      # for row in resp['data']:
      #     self.assertTrue(row[rental_price_index] > 0)
  
      # test http api
      project_name = "mindsdb"
      model_name = "p_test_1"
  
      # list projects
      response = self.api_request("get", "/projects")
      assert (
          response.status_code == 200
      ), "Error to get list of projects"
  
      projects = [i["name"] for i in response.json()]
      assert project_name in projects
  
      # list models
      response = self.api_request(
          "get", f"/projects/{project_name}/models"
      )
      assert response.status_code == 200, "Error to get list of models"
      models = [i["name"] for i in response.json()]
      assert model_name in models
  
      # prediction
      payload = {"data": [{"sqft": "1000"}, {"sqft": "500"}]}
      response = self.api_request(
          "post",
          f"/projects/{project_name}/models/{model_name}/predict",
          payload=payload,
      )
      assert response.status_code == 200, "Error to make prediction"
  
      # 2 prediction result
      assert len(response.json()) == 2
  
      # 1st version of model
      response = self.api_request(
          "post",
          f"/projects/{project_name}/models/{model_name}.1/predict",
          payload=payload,
      )
      assert response.status_code == 200, "Error to make prediction"
  
      assert len(response.json()) == 2
  
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 14 for calling the TestHTTP obj's underlying member method code with example usage: obj.test_sql_create_predictor() without return types