docstr: target: test drop collection with invalid api key
  method: drop collection with invalid api key
  expected: raise error with right error code and message; collection still in collection list
docstr_tok: ["target",":","test","drop","collection","with","invalid","api","key","method",":","drop","collection","with","invalid","api","key","expected",":","raise","error","with","right","error","code","and","message",";","collection","still","in","collection","list"]
code: def test_drop_collections_with_invalid_api_key(self):
      """
      target: test drop collection with invalid api key
      method: drop collection with invalid api key
      expected: raise error with right error code and message; collection still in collection list
      """
      name = gen_collection_name()
      dim = 128
      client = self.collection_client
      payload = {
          "collectionName": name,
          "dimension": dim,
      }
      rsp = client.collection_create(payload)
      assert rsp["code"] == 200
      rsp = client.collection_list()
      all_collections = rsp["data"]
      assert name in all_collections
      # drop collection
      payload = {
          "collectionName": name,
      }
      illegal_client = CollectionClient(
          self.url, "invalid_api_key", self.protocol
      )
      rsp = illegal_client.collection_drop(payload)
      assert rsp["code"] == 1800
      rsp = client.collection_list()
      all_collections = rsp["data"]
      assert name in all_collections
  
imports: import datetime
  import random
  import time
  from utils.util_log import test_log
  from utils.utils import gen_collection_name
  import pytest
  from api.milvus import CollectionClient
  from base.testbase import TestBase
  import threading
label_desc: Use image node_id 2 for calling the TestDropCollection obj's underlying member method code with example usage: obj.test_drop_collections_with_invalid_api_key() without return types