class_docstr: Test the WeaviateHook Hook.
class_docstr_tok: ["Test","the","WeaviateHook","Hook","."]
docstr: Test the get_all_objects method of WeaviateHook can return a dataframe.
docstr_tok: ["Test","the","get_all_objects","method","of","WeaviateHook","can","return","a","dataframe","."]
code: def test_get_all_objects_returns_dataframe(self, weaviate_hook):
      """
      Test the get_all_objects method of WeaviateHook can return a dataframe.
      """
      mock_client = MagicMock()
      weaviate_hook.get_conn = MagicMock(return_value=mock_client)
      objects = [
          {
              "deprecations": None,
              "objects": [
                  {"name": "Test1", "id": 2},
                  {"name": "Test2", "id": 3},
              ],
          },
          {"deprecations": None, "objects": []},
      ]
      mock_get_object = MagicMock()
      weaviate_hook.get_object = mock_get_object
      mock_get_object.side_effect = objects
  
      return_value = weaviate_hook.get_all_objects(
          class_name="TestClass", as_dataframe=True
      )
      assert weaviate_hook.get_object.call_args_list == [
          mock.call(after=None, class_name="TestClass"),
          mock.call(after=3, class_name="TestClass"),
      ]
      import pandas
  
      assert isinstance(return_value, pandas.DataFrame)
  
imports: from __future__ import annotations
  from contextlib import ExitStack
  from unittest import mock
  from unittest.mock import MagicMock, Mock
  import pandas
  import pytest
  import requests
  import weaviate
  from weaviate import ObjectAlreadyExistsException
  from airflow.models import Connection
  from airflow.providers.weaviate.hooks.weaviate import WeaviateHook
label_desc: Use image node_id 14 for calling the TestWeaviateHook obj's underlying member method code with example usage: obj.test_get_all_objects_returns_dataframe(weaviate_hook) without return types