class_docstr: Calls to :meth:`orion.core.io.database.AbstractDB.write`.
docstr: Should insert a single new entry in the collection.
docstr_tok: ["Should","insert","a","single","new","entry","in","the","collection","."]
code: def test_insert_one(self, orion_db):
      """Should insert a single new entry in the collection."""
      item = {"exp_name": "supernaekei", "user": "tsirif"}
      count_before = orion_db.count("experiments")
      # call interface
      assert orion_db.write("experiments", item) == 1
      assert orion_db.count("experiments") == count_before + 1
      value = get_db(orion_db)["experiments"].find(
          {"exp_name": "supernaekei"}
      )[0]
      assert value == item
  
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 1 for calling the TestWrite obj's underlying member method code with example usage: obj.test_insert_one(orion_db) without return types