2020 TimeParser ,
2121 WaitResult ,
2222)
23+ from graphdatascience .session .aura_api_token_authentication import AuraApiTokenAuthentication
2324from graphdatascience .session .cloud_location import CloudLocation
2425from graphdatascience .session .dbms_connection_info import DbmsConnectionInfo
2526from graphdatascience .session .dedicated_sessions import DedicatedSessions
@@ -345,6 +346,9 @@ def test_create_attached_session(mocker: MockerFixture, aura_api: AuraApi) -> No
345346 ttl = ttl ,
346347 )
347348
349+ arrow_authentication = gds_parameters ["arrow_authentication" ] # type: ignore
350+ del gds_parameters ["arrow_authentication" ]
351+
348352 assert gds_parameters == { # type: ignore
349353 "db_runner" : {
350354 "endpoint" : "neo4j+s://ffff0.databases.neo4j.io" ,
@@ -353,12 +357,14 @@ def test_create_attached_session(mocker: MockerFixture, aura_api: AuraApi) -> No
353357 "database" : None ,
354358 "show_progress" : False ,
355359 },
356- "session_connection " : DbmsConnectionInfo (
360+ "session_bolt_connection_info " : DbmsConnectionInfo (
357361 uri = "neo4j+s://foo.bar" , username = "client-id" , password = "client_secret"
358362 ),
359363 "session_id" : "ffff0-ffff1" ,
360364 }
361365
366+ assert isinstance (arrow_authentication , AuraApiTokenAuthentication )
367+
362368 assert len (sessions .list ()) == 1
363369 actual_session = sessions .list ()[0 ]
364370
@@ -383,6 +389,9 @@ def test_create_standalone_session(mocker: MockerFixture, aura_api: AuraApi) ->
383389 ttl = ttl ,
384390 )
385391
392+ arrow_authentication = gds_credentials ["arrow_authentication" ] # type: ignore
393+ del gds_credentials ["arrow_authentication" ]
394+
386395 assert gds_credentials == { # type: ignore
387396 "db_runner" : {
388397 "endpoint" : "neo4j+s://foo.bar" ,
@@ -391,12 +400,14 @@ def test_create_standalone_session(mocker: MockerFixture, aura_api: AuraApi) ->
391400 "database" : None ,
392401 "show_progress" : False ,
393402 },
394- "session_connection " : DbmsConnectionInfo (
403+ "session_bolt_connection_info " : DbmsConnectionInfo (
395404 uri = "neo4j+s://foo.bar" , username = "client-id" , password = "client_secret"
396405 ),
397406 "session_id" : "None-ffff0" ,
398407 }
399408
409+ assert isinstance (arrow_authentication , AuraApiTokenAuthentication )
410+
400411 assert len (sessions .list ()) == 1
401412 actual_session = sessions .list ()[0 ]
402413
@@ -424,6 +435,10 @@ def test_get_or_create(mocker: MockerFixture, aura_api: AuraApi) -> None:
424435 DbmsConnectionInfo ("neo4j+s://ffff0.databases.neo4j.io" , "dbuser" , "db_pw" ),
425436 )
426437
438+ arrow_authentication = gds_args1 ["arrow_authentication" ] # type: ignore
439+ del gds_args1 ["arrow_authentication" ]
440+ del gds_args2 ["arrow_authentication" ]
441+
427442 assert gds_args1 == { # type: ignore
428443 "db_runner" : {
429444 "endpoint" : "neo4j+s://ffff0.databases.neo4j.io" ,
@@ -432,13 +447,15 @@ def test_get_or_create(mocker: MockerFixture, aura_api: AuraApi) -> None:
432447 "database" : None ,
433448 "show_progress" : False ,
434449 },
435- "session_connection " : DbmsConnectionInfo (
450+ "session_bolt_connection_info " : DbmsConnectionInfo (
436451 uri = "neo4j+s://foo.bar" , username = "client-id" , password = "client_secret"
437452 ),
438453 "session_id" : "ffff0-ffff1" ,
439454 }
440455 assert gds_args1 == gds_args2
441456
457+ assert isinstance (arrow_authentication , AuraApiTokenAuthentication )
458+
442459 assert [i .name for i in sessions .list ()] == ["my-session" ]
443460
444461
0 commit comments