@@ -201,7 +201,7 @@ def test_can_obtain_notification_info(self):
201201class TransactionTestCase (TestCase ):
202202 def test_can_commit_transaction (self ):
203203 with GraphDatabase .driver ("bolt://localhost" ).session () as session :
204- tx = session .new_transaction ()
204+ tx = session .begin_transaction ()
205205
206206 # Create a node
207207 result = tx .run ("CREATE (a) RETURN id(a)" )
@@ -222,7 +222,7 @@ def test_can_commit_transaction(self):
222222
223223 def test_can_rollback_transaction (self ):
224224 with GraphDatabase .driver ("bolt://localhost" ).session () as session :
225- tx = session .new_transaction ()
225+ tx = session .begin_transaction ()
226226
227227 # Create a node
228228 result = tx .run ("CREATE (a) RETURN id(a)" )
@@ -242,7 +242,7 @@ def test_can_rollback_transaction(self):
242242
243243 def test_can_commit_transaction_using_with_block (self ):
244244 with GraphDatabase .driver ("bolt://localhost" ).session () as session :
245- with session .new_transaction () as tx :
245+ with session .begin_transaction () as tx :
246246 # Create a node
247247 result = tx .run ("CREATE (a) RETURN id(a)" )
248248 node_id = result [0 ][0 ]
@@ -262,7 +262,7 @@ def test_can_commit_transaction_using_with_block(self):
262262
263263 def test_can_rollback_transaction_using_with_block (self ):
264264 with GraphDatabase .driver ("bolt://localhost" ).session () as session :
265- with session .new_transaction () as tx :
265+ with session .begin_transaction () as tx :
266266 # Create a node
267267 result = tx .run ("CREATE (a) RETURN id(a)" )
268268 node_id = result [0 ][0 ]
0 commit comments