class_docstr: Calls to :meth:`orion.core.io.database.AbstractDB.ensure_index`.
docstr: Sort order should only be added to index when executed on a mongo
  database
docstr_tok: ["Sort","order","should","only","be","added","to","index","when","executed","on","a","mongo","database"]
code: def test_ordered_index(self, orion_db, db_test_data):
      """Sort order should only be added to index when executed on a mongo
      database"""
      key, stored_key = db_test_data
      assert (
          stored_key
          not in get_db(orion_db)["new_collection"].index_information()
      )
      orion_db.ensure_index(
          "new_collection", [(key, Database.DESCENDING)], unique=True
      )
      assert (
          stored_key
          in get_db(orion_db)["new_collection"].index_information()
      )
  
imports: import os
  from datetime import datetime
  import pytest
  from orion.core.io.database import Database
  from orion.core.io.database.ephemeraldb import EphemeralDB
  from orion.core.io.database.mongodb import MongoDB
  from orion.core.io.database.pickleddb import PickledDB
label_desc: Use image node_id 3 for calling the TestEnsureIndex obj's underlying member method code with example usage: obj.test_ordered_index(orion_db, db_test_data) without return types