@@ -119,6 +119,15 @@ def remove(self, key: TokenKey) -> None:
119119        yield  tmp_cache 
120120
121121
122+ @pytest .fixture () 
123+ def  omit_oauth_urls_check ():
124+     with  mock .patch (
125+         "snowflake.connector.SnowflakeConnection._check_oauth_parameters" ,
126+         return_value = None ,
127+     ):
128+         yield 
129+ 
130+ 
122131@pytest .mark .skipolddriver  
123132@patch ("snowflake.connector.auth._http_server.AuthHttpServer.DEFAULT_TIMEOUT" , 30 ) 
124133def  test_oauth_code_successful_flow (
@@ -127,6 +136,7 @@ def test_oauth_code_successful_flow(
127136    wiremock_generic_mappings_dir ,
128137    webbrowser_mock ,
129138    monkeypatch ,
139+     omit_oauth_urls_check ,
130140) ->  None :
131141    monkeypatch .setenv ("SF_ENABLE_EXPERIMENTAL_AUTHENTICATION" , "true" )
132142    monkeypatch .setenv ("SNOWFLAKE_AUTH_SOCKET_REUSE_PORT" , "true" )
@@ -169,6 +179,7 @@ def test_oauth_code_invalid_state(
169179    wiremock_oauth_authorization_code_dir ,
170180    webbrowser_mock ,
171181    monkeypatch ,
182+     omit_oauth_urls_check ,
172183) ->  None :
173184    monkeypatch .setenv ("SF_ENABLE_EXPERIMENTAL_AUTHENTICATION" , "true" )
174185    monkeypatch .setenv ("SNOWFLAKE_AUTH_SOCKET_REUSE_PORT" , "true" )
@@ -241,6 +252,7 @@ def test_oauth_code_token_request_error(
241252    wiremock_oauth_authorization_code_dir ,
242253    webbrowser_mock ,
243254    monkeypatch ,
255+     omit_oauth_urls_check ,
244256) ->  None :
245257    monkeypatch .setenv ("SF_ENABLE_EXPERIMENTAL_AUTHENTICATION" , "true" )
246258    monkeypatch .setenv ("SNOWFLAKE_AUTH_SOCKET_REUSE_PORT" , "true" )
@@ -279,6 +291,7 @@ def test_oauth_code_browser_timeout(
279291    wiremock_oauth_authorization_code_dir ,
280292    webbrowser_mock ,
281293    monkeypatch ,
294+     omit_oauth_urls_check ,
282295) ->  None :
283296    monkeypatch .setenv ("SF_ENABLE_EXPERIMENTAL_AUTHENTICATION" , "true" )
284297    monkeypatch .setenv ("SNOWFLAKE_AUTH_SOCKET_REUSE_PORT" , "true" )
@@ -320,6 +333,7 @@ def test_oauth_code_custom_urls(
320333    wiremock_generic_mappings_dir ,
321334    webbrowser_mock ,
322335    monkeypatch ,
336+     omit_oauth_urls_check ,
323337) ->  None :
324338    monkeypatch .setenv ("SF_ENABLE_EXPERIMENTAL_AUTHENTICATION" , "true" )
325339    monkeypatch .setenv ("SNOWFLAKE_AUTH_SOCKET_REUSE_PORT" , "true" )
@@ -363,6 +377,7 @@ def test_oauth_code_successful_refresh_token_flow(
363377    wiremock_generic_mappings_dir ,
364378    monkeypatch ,
365379    temp_cache ,
380+     omit_oauth_urls_check ,
366381) ->  None :
367382    monkeypatch .setenv ("SF_ENABLE_EXPERIMENTAL_AUTHENTICATION" , "true" )
368383    monkeypatch .setenv ("SNOWFLAKE_AUTH_SOCKET_REUSE_PORT" , "true" )
@@ -423,6 +438,7 @@ def test_oauth_code_expired_refresh_token_flow(
423438    webbrowser_mock ,
424439    monkeypatch ,
425440    temp_cache ,
441+     omit_oauth_urls_check ,
426442) ->  None :
427443    monkeypatch .setenv ("SF_ENABLE_EXPERIMENTAL_AUTHENTICATION" , "true" )
428444    monkeypatch .setenv ("SNOWFLAKE_AUTH_SOCKET_REUSE_PORT" , "true" )
@@ -526,7 +542,6 @@ def test_client_creds_successful_flow(
526542            protocol = "http" ,
527543            role = "ANALYST" ,
528544            oauth_token_request_url = f"http://{ wiremock_client .wiremock_host }  :{ wiremock_client .wiremock_http_port }  /oauth/token-request" ,
529-             oauth_authorization_url = f"http://{ wiremock_client .wiremock_host }  :{ wiremock_client .wiremock_http_port }  /oauth/authorize" ,
530545            host = wiremock_client .wiremock_host ,
531546            port = wiremock_client .wiremock_http_port ,
532547        )
0 commit comments