@@ -370,9 +370,7 @@ async def test_login_success(self):
370370 mock_response .__aexit__ = AsyncMock (return_value = None )
371371 session .post = MagicMock (return_value = mock_response )
372372
373- strategy = SessionLoginStrategy (
374- credentials , session , server_config , True , APIType .CLOUD
375- )
373+ strategy = SessionLoginStrategy (credentials , session , server_config , True )
376374 await strategy .login ()
377375
378376 session .post .assert_called_once ()
@@ -397,9 +395,7 @@ async def test_login_204_no_content(self):
397395 mock_response .__aexit__ = AsyncMock (return_value = None )
398396 session .post = MagicMock (return_value = mock_response )
399397
400- strategy = SessionLoginStrategy (
401- credentials , session , server_config , True , APIType .CLOUD
402- )
398+ strategy = SessionLoginStrategy (credentials , session , server_config , True )
403399 await strategy .login ()
404400
405401 # Should not call json() for 204 response
@@ -418,9 +414,7 @@ async def test_refresh_if_needed_no_refresh(self):
418414 credentials = UsernamePasswordCredentials ("user" , "pass" )
419415 session = AsyncMock (spec = ClientSession )
420416
421- strategy = SessionLoginStrategy (
422- credentials , session , server_config , True , APIType .CLOUD
423- )
417+ strategy = SessionLoginStrategy (credentials , session , server_config , True )
424418 result = await strategy .refresh_if_needed ()
425419
426420 assert not result
@@ -437,9 +431,7 @@ def test_auth_headers_no_token(self):
437431 credentials = UsernamePasswordCredentials ("user" , "pass" )
438432 session = AsyncMock (spec = ClientSession )
439433
440- strategy = SessionLoginStrategy (
441- credentials , session , server_config , True , APIType .CLOUD
442- )
434+ strategy = SessionLoginStrategy (credentials , session , server_config , True )
443435 headers = strategy .auth_headers ()
444436
445437 assert headers == {}
@@ -461,9 +453,7 @@ async def test_login_no_op(self):
461453 credentials = TokenCredentials ("my_bearer_token" )
462454 session = AsyncMock (spec = ClientSession )
463455
464- strategy = BearerTokenAuthStrategy (
465- credentials , session , server_config , True , APIType .CLOUD
466- )
456+ strategy = BearerTokenAuthStrategy (credentials , session , server_config , True )
467457 result = await strategy .login ()
468458
469459 # Login should be a no-op
@@ -481,9 +471,7 @@ def test_auth_headers_with_token(self):
481471 credentials = TokenCredentials ("my_bearer_token" )
482472 session = AsyncMock (spec = ClientSession )
483473
484- strategy = BearerTokenAuthStrategy (
485- credentials , session , server_config , True , APIType .CLOUD
486- )
474+ strategy = BearerTokenAuthStrategy (credentials , session , server_config , True )
487475 headers = strategy .auth_headers ()
488476
489477 assert headers == {"Authorization" : "Bearer my_bearer_token" }
@@ -537,9 +525,7 @@ async def test_login_maps_invalid_credentials_client_error(self):
537525 patch ("warrant_lite.WarrantLite" , return_value = warrant_instance ),
538526 pytest .raises (NexityBadCredentialsError ),
539527 ):
540- strategy = NexityAuthStrategy (
541- credentials , session , server_config , True , APIType .CLOUD
542- )
528+ strategy = NexityAuthStrategy (credentials , session , server_config , True )
543529 await strategy .login ()
544530
545531 @pytest .mark .asyncio
@@ -567,9 +553,7 @@ async def test_login_propagates_non_auth_client_error(self):
567553 patch ("warrant_lite.WarrantLite" , return_value = warrant_instance ),
568554 pytest .raises (ClientError , match = "InternalErrorException" ),
569555 ):
570- strategy = NexityAuthStrategy (
571- credentials , session , server_config , True , APIType .CLOUD
572- )
556+ strategy = NexityAuthStrategy (credentials , session , server_config , True )
573557 await strategy .login ()
574558
575559
@@ -598,9 +582,7 @@ async def test_exchange_token_error_response(self):
598582 mock_response .__aexit__ = AsyncMock (return_value = None )
599583 session .post = MagicMock (return_value = mock_response )
600584
601- strategy = RexelAuthStrategy (
602- credentials , session , server_config , True , APIType .CLOUD
603- )
585+ strategy = RexelAuthStrategy (credentials , session , server_config , True )
604586
605587 with pytest .raises (InvalidTokenError , match = "bad grant" ):
606588 await strategy ._exchange_token ({"grant_type" : "authorization_code" })
0 commit comments