class_docstr: Test Class for Stability Integration Testing
class_docstr_tok: ["Test","Class","for","Stability","Integration","Testing"]
docstr: Test for bulk question/answer pairs
docstr_tok: ["Test","for","bulk","question\/answer","pairs"]
code: def test_bulk_text(self, mock_handler):
      """Test for bulk question/answer pairs"""
      df = pd.DataFrame.from_dict(
          {"text": ["A black swan", "A pink unicorn"]}
      )
      self.set_handler(mock_handler, name="pg", tables={"df": df})
  
      self.run_sql(
          f"""
             CREATE MODEL proj.test_stability_bulk_text
             PREDICT answer
             USING
                 engine='stability_engine',
                  task = "text-to-image",
                  local_directory_path = "tests/unit/ml_handlers/data",
                  api_key='{self.get_api_key('STABILITY_API_KEY')}';
          """
      )
      self.wait_predictor("proj", "test_stability_bulk_text")
  
      result_df = self.run_sql(
          """
              SELECT p.answer
              FROM pg.df as t
              JOIN proj.test_stability_bulk_text as p;
          """
      )
      assert result_df["answer"].size == 2
  
file_path: mindsdb/tests/unit/ml_handlers/test_stabilityai.py
imports: import os
  import pytest
  import pandas
  from unittest.mock import patch
  from .base_ml_test import BaseMLAPITest
label_desc: Use image node_id 6 for calling the TestStabilityAI obj's underlying member method code with example usage: obj.test_bulk_text(mock_handler) without return types