@@ -35,6 +35,8 @@ def assert_is_authorization_error(self, error):
3535 elif driver in ['javascript' ]:
3636 # only test for code
3737 pass
38+ elif driver in ['dotnet' ]:
39+ self .assertEqual ("AuthorizationExpired" , error .errorType )
3840 else :
3941 self .fail ("no error mapping is defined for %s driver" % driver )
4042
@@ -223,7 +225,7 @@ def switch_unused_servers(self, servers, new_script):
223225 def test_should_fail_with_auth_expired_on_pull_using_session_run (
224226 self ):
225227 # TODO remove this block once all languages work
226- if get_driver_name () in ['go' , 'dotnet' ]:
228+ if get_driver_name () in ['go' ]:
227229 self .skipTest ("requires authorization expired response support" )
228230 driver = Driver (self ._backend , self ._uri , self ._auth ,
229231 userAgent = self ._userAgent )
@@ -236,7 +238,7 @@ def test_should_fail_with_auth_expired_on_pull_using_session_run(
236238
237239 session = driver .session ('r' , database = self .get_db ())
238240 try :
239- session .run ("RETURN 1 as n" ). consume ()
241+ session .run ("RETURN 1 as n" )
240242 except types .DriverError as e :
241243 self .assert_is_authorization_error (error = e )
242244 session .close ()
@@ -247,7 +249,7 @@ def test_should_fail_with_auth_expired_on_pull_using_session_run(
247249
248250 def test_should_fail_with_auth_expired_on_begin_using_tx_run (self ):
249251 # TODO remove this block once all languages work
250- if get_driver_name () in ['go' , 'dotnet' ]:
252+ if get_driver_name () in ['go' ]:
251253 self .skipTest ("requires authorization expired response support" )
252254 driver = Driver (self ._backend , self ._uri , self ._auth ,
253255 userAgent = self ._userAgent )
@@ -274,7 +276,7 @@ def test_should_fail_with_auth_expired_on_begin_using_tx_run(self):
274276
275277 def test_should_fail_with_auth_expired_on_run_using_tx_run (self ):
276278 # TODO remove this block once all languages work
277- if get_driver_name () in ['go' , 'dotnet' ]:
279+ if get_driver_name () in ['go' ]:
278280 self .skipTest ("requires authorization expired response support" )
279281 driver = Driver (self ._backend , self ._uri , self ._auth ,
280282 userAgent = self ._userAgent )
@@ -299,7 +301,7 @@ def test_should_fail_with_auth_expired_on_run_using_tx_run(self):
299301
300302 def test_should_fail_with_auth_expired_on_pull_using_tx_run (self ):
301303 # TODO remove this block once all languages work
302- if get_driver_name () in ['go' , 'dotnet' ]:
304+ if get_driver_name () in ['go' ]:
303305 self .skipTest ("requires authorization expired response support" )
304306 driver = Driver (self ._backend , self ._uri , self ._auth ,
305307 userAgent = self ._userAgent )
@@ -324,7 +326,7 @@ def test_should_fail_with_auth_expired_on_pull_using_tx_run(self):
324326
325327 def test_should_fail_with_auth_expired_on_commit_using_tx_run (self ):
326328 # TODO remove this block once all languages work
327- if get_driver_name () in ['go' , 'dotnet' ]:
329+ if get_driver_name () in ['go' ]:
328330 self .skipTest ("requires authorization expired response support" )
329331 driver = Driver (self ._backend , self ._uri , self ._auth ,
330332 userAgent = self ._userAgent )
@@ -350,7 +352,7 @@ def test_should_fail_with_auth_expired_on_commit_using_tx_run(self):
350352
351353 def test_should_fail_with_auth_expired_on_rollback_using_tx_run (self ):
352354 # TODO remove this block once all languages work
353- if get_driver_name () in ['go' , 'dotnet' ]:
355+ if get_driver_name () in ['go' ]:
354356 self .skipTest ("requires authorization expired response support" )
355357 driver = Driver (self ._backend , self ._uri , self ._auth ,
356358 userAgent = self ._userAgent )
@@ -377,7 +379,7 @@ def test_should_fail_with_auth_expired_on_rollback_using_tx_run(self):
377379 def test_should_retry_on_auth_expired_on_begin_using_tx_function (
378380 self ):
379381 # TODO remove this block once all languages work
380- if get_driver_name () in ['go' , 'dotnet' ]:
382+ if get_driver_name () in ['go' ]:
381383 self .skipTest ("requires authorization expired response support" )
382384 driver = Driver (self ._backend , self ._uri , self ._auth ,
383385 userAgent = self ._userAgent )
@@ -419,7 +421,7 @@ def work(tx):
419421 def test_should_retry_on_auth_expired_on_run_using_tx_function (
420422 self ):
421423 # TODO remove this block once all languages work
422- if get_driver_name () in ['go' , 'dotnet' ]:
424+ if get_driver_name () in ['go' ]:
423425 self .skipTest ("requires authorization expired response support" )
424426 driver = Driver (self ._backend , self ._uri , self ._auth ,
425427 userAgent = self ._userAgent )
@@ -461,7 +463,7 @@ def work(tx):
461463 def test_should_retry_on_auth_expired_on_pull_using_tx_function (
462464 self ):
463465 # TODO remove this block once all languages work
464- if get_driver_name () in ['go' , 'dotnet' ]:
466+ if get_driver_name () in ['go' ]:
465467 self .skipTest ("requires authorization expired response support" )
466468 driver = Driver (self ._backend , self ._uri , self ._auth ,
467469 userAgent = self ._userAgent )
@@ -503,7 +505,7 @@ def work(tx):
503505 def test_should_retry_on_auth_expired_on_commit_using_tx_function (
504506 self ):
505507 # TODO remove this block once all languages work
506- if get_driver_name () in ['go' , 'dotnet' ]:
508+ if get_driver_name () in ['go' ]:
507509 self .skipTest ("requires authorization expired response support" )
508510 driver = Driver (self ._backend , self ._uri , self ._auth ,
509511 userAgent = self ._userAgent )
0 commit comments