20
20
TimeParser ,
21
21
WaitResult ,
22
22
)
23
+ from graphdatascience .session .aura_api_token_authentication import AuraApiTokenAuthentication
23
24
from graphdatascience .session .cloud_location import CloudLocation
24
25
from graphdatascience .session .dbms_connection_info import DbmsConnectionInfo
25
26
from graphdatascience .session .dedicated_sessions import DedicatedSessions
@@ -345,6 +346,9 @@ def test_create_attached_session(mocker: MockerFixture, aura_api: AuraApi) -> No
345
346
ttl = ttl ,
346
347
)
347
348
349
+ arrow_authentication = gds_parameters ["arrow_authentication" ] # type: ignore
350
+ del gds_parameters ["arrow_authentication" ]
351
+
348
352
assert gds_parameters == { # type: ignore
349
353
"db_runner" : {
350
354
"endpoint" : "neo4j+s://ffff0.databases.neo4j.io" ,
@@ -353,12 +357,14 @@ def test_create_attached_session(mocker: MockerFixture, aura_api: AuraApi) -> No
353
357
"database" : None ,
354
358
"show_progress" : False ,
355
359
},
356
- "session_connection " : DbmsConnectionInfo (
360
+ "session_bolt_connection_info " : DbmsConnectionInfo (
357
361
uri = "neo4j+s://foo.bar" , username = "client-id" , password = "client_secret"
358
362
),
359
363
"session_id" : "ffff0-ffff1" ,
360
364
}
361
365
366
+ assert isinstance (arrow_authentication , AuraApiTokenAuthentication )
367
+
362
368
assert len (sessions .list ()) == 1
363
369
actual_session = sessions .list ()[0 ]
364
370
@@ -383,6 +389,9 @@ def test_create_standalone_session(mocker: MockerFixture, aura_api: AuraApi) ->
383
389
ttl = ttl ,
384
390
)
385
391
392
+ arrow_authentication = gds_credentials ["arrow_authentication" ] # type: ignore
393
+ del gds_credentials ["arrow_authentication" ]
394
+
386
395
assert gds_credentials == { # type: ignore
387
396
"db_runner" : {
388
397
"endpoint" : "neo4j+s://foo.bar" ,
@@ -391,12 +400,14 @@ def test_create_standalone_session(mocker: MockerFixture, aura_api: AuraApi) ->
391
400
"database" : None ,
392
401
"show_progress" : False ,
393
402
},
394
- "session_connection " : DbmsConnectionInfo (
403
+ "session_bolt_connection_info " : DbmsConnectionInfo (
395
404
uri = "neo4j+s://foo.bar" , username = "client-id" , password = "client_secret"
396
405
),
397
406
"session_id" : "None-ffff0" ,
398
407
}
399
408
409
+ assert isinstance (arrow_authentication , AuraApiTokenAuthentication )
410
+
400
411
assert len (sessions .list ()) == 1
401
412
actual_session = sessions .list ()[0 ]
402
413
@@ -424,6 +435,10 @@ def test_get_or_create(mocker: MockerFixture, aura_api: AuraApi) -> None:
424
435
DbmsConnectionInfo ("neo4j+s://ffff0.databases.neo4j.io" , "dbuser" , "db_pw" ),
425
436
)
426
437
438
+ arrow_authentication = gds_args1 ["arrow_authentication" ] # type: ignore
439
+ del gds_args1 ["arrow_authentication" ]
440
+ del gds_args2 ["arrow_authentication" ]
441
+
427
442
assert gds_args1 == { # type: ignore
428
443
"db_runner" : {
429
444
"endpoint" : "neo4j+s://ffff0.databases.neo4j.io" ,
@@ -432,13 +447,15 @@ def test_get_or_create(mocker: MockerFixture, aura_api: AuraApi) -> None:
432
447
"database" : None ,
433
448
"show_progress" : False ,
434
449
},
435
- "session_connection " : DbmsConnectionInfo (
450
+ "session_bolt_connection_info " : DbmsConnectionInfo (
436
451
uri = "neo4j+s://foo.bar" , username = "client-id" , password = "client_secret"
437
452
),
438
453
"session_id" : "ffff0-ffff1" ,
439
454
}
440
455
assert gds_args1 == gds_args2
441
456
457
+ assert isinstance (arrow_authentication , AuraApiTokenAuthentication )
458
+
442
459
assert [i .name for i in sessions .list ()] == ["my-session" ]
443
460
444
461
0 commit comments