@@ -15,8 +15,8 @@ def client_environment_settings(monkeypatch):
1515 monkeypatch .setenv ("CTP_CLIENT_ID" , "client_id" )
1616 monkeypatch .setenv ("CTP_CLIENT_SECRET" , "client_secret" )
1717 monkeypatch .setenv ("CTP_CLIENT_SCOPES" , "some_scope" )
18- monkeypatch .setenv ("CTP_API_URL" , "https://api.shere.io " )
19- monkeypatch .setenv ("CTP_AUTH_URL" , "https://auth.sphere.io " )
18+ monkeypatch .setenv ("CTP_API_URL" , "https://api.europe-west1.gcp.commercetools.com " )
19+ monkeypatch .setenv ("CTP_AUTH_URL" , "https://auth.europe-west1.gcp.commercetools.com " )
2020
2121
2222def test_client_with_environment_settings_is_setup (
@@ -33,8 +33,8 @@ def test_auto_refresh(commercetools_api):
3333 client_id = "unittest" ,
3434 client_secret = "mysecret" ,
3535 project_key = "test" ,
36- url = "https://api.sphere.io " ,
37- token_url = "https://auth.sphere.io /oauth/token" ,
36+ url = "https://api.europe-west1.gcp.commercetools.com " ,
37+ token_url = "https://auth.europe-west1.gcp.commercetools.com /oauth/token" ,
3838 )
3939 client .products .query ()
4040 time .sleep (1 )
@@ -43,7 +43,7 @@ def test_auto_refresh(commercetools_api):
4343
4444 auth_headers = set ()
4545 for request in commercetools_api .requests_mock .request_history :
46- if request .url .startswith ("https://api.sphere.io /" ):
46+ if request .url .startswith ("https://api.europe-west1.gcp.commercetools.com /" ):
4747 auth_headers .add (request .headers ["Authorization" ])
4848
4949 assert len (auth_headers ) == 2
@@ -55,17 +55,17 @@ def test_cache_token(commercetools_api):
5555 client_id = "unittest" ,
5656 client_secret = "none" ,
5757 project_key = "test" ,
58- url = "https://api.sphere.io " ,
59- token_url = "https://auth.sphere.io /oauth/token" ,
58+ url = "https://api.europe-west1.gcp.commercetools.com " ,
59+ token_url = "https://auth.europe-west1.gcp.commercetools.com /oauth/token" ,
6060 )
6161 assert len (commercetools_api .requests_mock .request_history ) == 1
6262
6363 Client (
6464 client_id = "unittest" ,
6565 client_secret = "none" ,
6666 project_key = "test" ,
67- url = "https://api.sphere.io " ,
68- token_url = "https://auth.sphere.io /oauth/token" ,
67+ url = "https://api.europe-west1.gcp.commercetools.com " ,
68+ token_url = "https://auth.europe-west1.gcp.commercetools.com /oauth/token" ,
6969 )
7070 assert len (commercetools_api .requests_mock .request_history ) == 1
7171
@@ -74,15 +74,15 @@ def test_allows_passing_custom_http_adapter():
7474 my_adapter = Adapter ()
7575 my_adapter .register_uri (
7676 "POST" ,
77- "https://auth.sphere.io /oauth/token" ,
77+ "https://auth.europe-west1.gcp.commercetools.com /oauth/token" ,
7878 json = dict (access_token = "my_mock_access_token" ),
7979 )
8080 Client (
8181 client_id = "unittest" ,
8282 client_secret = "none" ,
8383 project_key = "test" ,
84- url = "https://api.sphere.io " ,
85- token_url = "https://auth.sphere.io /oauth/token" ,
84+ url = "https://api.europe-west1.gcp.commercetools.com " ,
85+ token_url = "https://auth.europe-west1.gcp.commercetools.com /oauth/token" ,
8686 http_adapter = my_adapter ,
8787 )
8888 assert len (my_adapter .request_history ) == 1
0 commit comments