Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions tests/stub/authorization.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,8 @@ def test_should_fail_with_auth_expired_on_pull_using_session_run(

session = driver.session('r', database=self.get_db())
try:
session.run("RETURN 1 as n")
result = session.run("RETURN 1 as n")
result.consume()
except types.DriverError as e:
self.assert_is_authorization_error(error=e)
session.close()
Expand Down Expand Up @@ -290,7 +291,8 @@ def test_should_fail_with_auth_expired_on_run_using_tx_run(self):
session = driver.session('r', database=self.get_db())
tx = session.beginTransaction()
try:
tx.run("RETURN 1 as n").consume()
result = tx.run("RETURN 1 as n")
result.consume()
except types.DriverError as e:
self.assert_is_authorization_error(error=e)
session.close()
Expand All @@ -315,7 +317,8 @@ def test_should_fail_with_auth_expired_on_pull_using_tx_run(self):
session = driver.session('r', database=self.get_db())
tx = session.beginTransaction()
try:
tx.run("RETURN 1 as n").consume()
result = tx.run("RETURN 1 as n")
result.consume()
except types.DriverError as e:
self.assert_is_authorization_error(error=e)
session.close()
Expand All @@ -339,7 +342,8 @@ def test_should_fail_with_auth_expired_on_commit_using_tx_run(self):

session = driver.session('r', database=self.get_db())
tx = session.beginTransaction()
tx.run("RETURN 1 as n").consume()
result = tx.run("RETURN 1 as n")
result.consume()
try:
tx.commit()
except types.DriverError as e:
Expand Down