Skip to content

Commit dd5172d

Browse files
committed
Add consumption to auth expired on pull tests
1 parent a565ab9 commit dd5172d

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

tests/stub/authorization.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,8 @@ def test_should_fail_with_auth_expired_on_pull_using_session_run(
238238

239239
session = driver.session('r', database=self.get_db())
240240
try:
241-
session.run("RETURN 1 as n")
241+
result = session.run("RETURN 1 as n")
242+
result.consume()
242243
except types.DriverError as e:
243244
self.assert_is_authorization_error(error=e)
244245
session.close()
@@ -290,7 +291,8 @@ def test_should_fail_with_auth_expired_on_run_using_tx_run(self):
290291
session = driver.session('r', database=self.get_db())
291292
tx = session.beginTransaction()
292293
try:
293-
tx.run("RETURN 1 as n").consume()
294+
result = tx.run("RETURN 1 as n")
295+
result.consume()
294296
except types.DriverError as e:
295297
self.assert_is_authorization_error(error=e)
296298
session.close()
@@ -315,7 +317,8 @@ def test_should_fail_with_auth_expired_on_pull_using_tx_run(self):
315317
session = driver.session('r', database=self.get_db())
316318
tx = session.beginTransaction()
317319
try:
318-
tx.run("RETURN 1 as n").consume()
320+
result = tx.run("RETURN 1 as n")
321+
result.consume()
319322
except types.DriverError as e:
320323
self.assert_is_authorization_error(error=e)
321324
session.close()
@@ -339,7 +342,8 @@ def test_should_fail_with_auth_expired_on_commit_using_tx_run(self):
339342

340343
session = driver.session('r', database=self.get_db())
341344
tx = session.beginTransaction()
342-
tx.run("RETURN 1 as n").consume()
345+
result = tx.run("RETURN 1 as n")
346+
result.consume()
343347
try:
344348
tx.commit()
345349
except types.DriverError as e:

0 commit comments

Comments
 (0)