class_docstr: Calls to :meth:`orion.core.io.database.AbstractDB.write`.
docstr: Should insert two new entry (as a list) in the collection.
docstr_tok: ["Should","insert","two","new","entry","(","as","a","list",")","in","the","collection","."]
code: def test_insert_many(self, orion_db):
      """Should insert two new entry (as a list) in the collection."""
      item = [
          {"exp_name": "supernaekei2", "user": "tsirif"},
          {"exp_name": "supernaekei3", "user": "tsirif"},
      ]
      count_before = orion_db.count("experiments")
      # call interface
      assert orion_db.write("experiments", item) == 2
      database = get_db(orion_db)
      assert orion_db.count("experiments") == count_before + 2
      value = database["experiments"].find(
          {"exp_name": "supernaekei2"}
      )[0]
      assert value == item[0]
      value = database["experiments"].find(
          {"exp_name": "supernaekei3"}
      )[0]
      assert value == item[1]
  
imports: import pickle
  from datetime import datetime
  import pytest
  from orion.core.io.database import Database, DatabaseError, DuplicateKeyError
  from orion.core.io.database.ephemeraldb import EphemeralDB
  from orion.core.io.database.mongodb import MongoDB
  from orion.core.io.database.pickleddb import PickledDB
  from .conftest import insert_test_collection
label_desc: Use image node_id 2 for calling the TestWrite obj's underlying member method code with example usage: obj.test_insert_many(orion_db) without return types