File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -335,7 +335,7 @@ def _build_httpx_client(
335
335
if (
336
336
api_token := api_token or os .environ .get ("REPLICATE_API_TOKEN" )
337
337
) and api_token != "" :
338
- headers ["Authorization" ] = f"Token { api_token } "
338
+ headers ["Authorization" ] = f"Bearer { api_token } "
339
339
340
340
base_url = (
341
341
base_url or os .environ .get ("REPLICATE_BASE_URL" ) or "https://api.replicate.com"
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ async def test_authorization_when_setting_environ_after_import():
14
14
router .route (
15
15
method = "GET" ,
16
16
url = "https://api.replicate.com/" ,
17
- headers = {"Authorization" : "Token test-set-after-import" },
17
+ headers = {"Authorization" : "Bearer test-set-after-import" },
18
18
).mock (
19
19
return_value = httpx .Response (
20
20
200 ,
@@ -42,7 +42,7 @@ async def test_client_error_handling():
42
42
router .route (
43
43
method = "GET" ,
44
44
url = "https://api.replicate.com/" ,
45
- headers = {"Authorization" : "Token test-client-error" },
45
+ headers = {"Authorization" : "Bearer test-client-error" },
46
46
).mock (
47
47
return_value = httpx .Response (
48
48
400 ,
@@ -69,7 +69,7 @@ async def test_server_error_handling():
69
69
router .route (
70
70
method = "GET" ,
71
71
url = "https://api.replicate.com/" ,
72
- headers = {"Authorization" : "Token test-server-error" },
72
+ headers = {"Authorization" : "Bearer test-server-error" },
73
73
).mock (
74
74
return_value = httpx .Response (
75
75
500 ,
You can’t perform that action at this time.
0 commit comments