File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ Common Changes
3232#) Enhanced type checking
3333 (`issue 54 <https://github.com/oracle/python-oracledb/issues/54 >`__),
3434 (`issue 60 <https://github.com/oracle/python-oracledb/issues/60 >`__).
35+ #) Improved test suite and documentation.
3536
3637
3738oracledb 1.1.0 (September 2022)
Original file line number Diff line number Diff line change @@ -468,5 +468,24 @@ def test_3420_save_and_get(self):
468468 self .assertEqual (doc .getContent (), fetched_doc .getContent ())
469469 coll .drop ()
470470
471+ def test_3421_insert_many_and_get (self ):
472+ "3421 - test insert many and get"
473+ soda_db = self .get_soda_database (minclient = (18 , 5 ))
474+ coll = soda_db .createCollection ("TestInsertManyAndGet" )
475+ values_to_insert = [
476+ dict (name = "George" , age = 25 ),
477+ soda_db .createDocument (dict (name = "Lucas" , age = 47 ))
478+ ]
479+ docs = coll .insertManyAndGet (values_to_insert )
480+ inserted_keys = [i .key for i in docs ]
481+ self .connection .commit ()
482+ self .assertEqual (coll .find ().count (), len (values_to_insert ))
483+ for key , expected_doc in zip (inserted_keys , values_to_insert ):
484+ if isinstance (expected_doc , dict ):
485+ expected_doc = soda_db .createDocument (expected_doc )
486+ doc = coll .find ().key (key ).getOne ()
487+ self .assertEqual (doc .getContent (), expected_doc .getContent ())
488+ coll .drop ()
489+
471490if __name__ == "__main__" :
472491 test_env .run_test_cases ()
You can’t perform that action at this time.
0 commit comments