docstr_tok: []
code: def test_collection_created_by_restful_describe_by_sdk(
      self, dim, metric_type, primary_field, vector_field
  ):
      """ """
      name = gen_collection_name()
      dim = 128
      client = self.collection_client
      payload = {
          "collectionName": name,
          "dimension": dim,
          "metricType": metric_type,
          "primaryField": primary_field,
          "vectorField": vector_field,
      }
      if primary_field is None:
          del payload["primaryField"]
      if vector_field is None:
          del payload["vectorField"]
      rsp = client.collection_create(payload)
      collection = Collection(name=name)
      logger.info(collection.schema)
      field_names = [field.name for field in collection.schema.fields]
      assert len(field_names) == 2
      assert collection.schema.enable_dynamic_field is True
      assert len(collection.indexes) > 0
  
file_path: milvus/tests/restful_client/testcases/test_restful_sdk_mix_use_scenario.py
imports: import random
  import time
  from utils.utils import gen_collection_name
  from utils.util_log import test_log
  import pytest
  from base.testbase import TestBase
  from pymilvus import FieldSchema, CollectionSchema, DataType, Collection
label_desc: Use image node_id 2 for calling the TestRestfulSdkCompatibility obj's underlying member method code with example usage: obj.test_collection_created_by_restful_describe_by_sdk(dim, metric_type, primary_field, vector_field) without return types