@@ -30,7 +30,7 @@ def test_ai_missing_purpose_is_allowed_by_default(mocked_client_integration):
3030 "authorization" : f"Bearer { TEST_FXA_TOKEN } " ,
3131 "service-type" : "ai" ,
3232 },
33- json = SAMPLE_REQUEST .dict (),
33+ json = SAMPLE_REQUEST .model_dump (),
3434 )
3535 assert response .status_code == 200
3636 assert response .json () == SUCCESSFUL_CHAT_RESPONSE
@@ -45,7 +45,7 @@ def test_ai_invalid_purpose_returns_400(mocked_client_integration):
4545 "service-type" : "ai" ,
4646 "purpose" : "invalid-purpose" ,
4747 },
48- json = SAMPLE_REQUEST .dict (),
48+ json = SAMPLE_REQUEST .model_dump (),
4949 )
5050 assert response .status_code == 400
5151 assert "purpose" in str (response .json ().get ("detail" , "" )).lower ()
@@ -59,7 +59,7 @@ def test_invalid_fxa_auth(mocked_client_integration):
5959 "service-type" : "ai" ,
6060 "purpose" : "chat" ,
6161 },
62- json = SAMPLE_REQUEST .dict (),
62+ json = SAMPLE_REQUEST .model_dump (),
6363 )
6464 assert response .status_code == 401
6565
@@ -72,7 +72,7 @@ def test_successful_request_with_mocked_fxa_auth(mocked_client_integration):
7272 "service-type" : "ai" ,
7373 "purpose" : "chat" ,
7474 },
75- json = SAMPLE_REQUEST .dict (),
75+ json = SAMPLE_REQUEST .model_dump (),
7676 )
7777 assert response .status_code != 401
7878 assert response .status_code != 400
@@ -93,7 +93,7 @@ def test_x_dev_authorization_success(mocked_client_integration):
9393 "purpose" : "chat" ,
9494 "x-dev-authorization" : DEV_TOKEN ,
9595 },
96- json = SAMPLE_REQUEST .dict (),
96+ json = SAMPLE_REQUEST .model_dump (),
9797 )
9898 assert response .status_code == 200
9999 assert response .json () == SUCCESSFUL_CHAT_RESPONSE
@@ -112,7 +112,7 @@ def test_x_dev_authorization_missing_fxa(mocked_client_integration):
112112 "purpose" : "chat" ,
113113 "x-dev-authorization" : DEV_TOKEN ,
114114 },
115- json = SAMPLE_REQUEST .dict (),
115+ json = SAMPLE_REQUEST .model_dump (),
116116 )
117117 assert response .status_code == 422
118118
@@ -131,7 +131,7 @@ def test_x_dev_authorization_invalid_token(mocked_client_integration):
131131 "purpose" : "chat" ,
132132 "x-dev-authorization" : "wrong-token" ,
133133 },
134- json = SAMPLE_REQUEST .dict (),
134+ json = SAMPLE_REQUEST .model_dump (),
135135 )
136136 assert response .status_code == 401
137137
@@ -149,7 +149,7 @@ def test_x_dev_authorization_token_not_configured(mocked_client_integration):
149149 "purpose" : "chat" ,
150150 "x-dev-authorization" : "some-token" ,
151151 },
152- json = SAMPLE_REQUEST .dict (),
152+ json = SAMPLE_REQUEST .model_dump (),
153153 )
154154 assert response .status_code == 422
155155
@@ -163,7 +163,7 @@ def test_ai_dev_requires_x_dev_authorization(mocked_client_integration):
163163 "service-type" : "ai-dev" ,
164164 "purpose" : "chat" ,
165165 },
166- json = SAMPLE_REQUEST .dict (),
166+ json = SAMPLE_REQUEST .model_dump (),
167167 )
168168 assert response .status_code == 401
169169 assert "x-dev-authorization required" in str (response .json ().get ("detail" , "" ))
@@ -186,7 +186,7 @@ def test_x_dev_authorization_ignored_for_non_dev_service_type(
186186 "purpose" : "chat" ,
187187 "x-dev-authorization" : DEV_TOKEN ,
188188 },
189- json = SAMPLE_REQUEST .dict (),
189+ json = SAMPLE_REQUEST .model_dump (),
190190 )
191191 assert response .status_code == 200
192192 assert response .json () == SUCCESSFUL_CHAT_RESPONSE
@@ -206,7 +206,7 @@ def test_x_dev_authorization_token_not_configured_with_fxa(mocked_client_integra
206206 "purpose" : "chat" ,
207207 "x-dev-authorization" : "some-token" ,
208208 },
209- json = SAMPLE_REQUEST .dict (),
209+ json = SAMPLE_REQUEST .model_dump (),
210210 )
211211 assert response .status_code == 401
212212 assert "Invalid x-dev-authorization" in str (response .json ().get ("detail" , "" ))
0 commit comments