@@ -187,9 +187,9 @@ def test_user_data_collection_data_collector_wrong_configuration() -> None:
187187def test_tls_configuration () -> None :
188188 """Test the TLS configuration."""
189189 cfg = TLSConfiguration (
190- tls_certificate_path = "tests/configuration/server.crt" ,
191- tls_key_path = "tests/configuration/server.key" ,
192- tls_key_password = "tests/configuration/password" ,
190+ tls_certificate_path = Path ( "tests/configuration/server.crt" ) ,
191+ tls_key_path = Path ( "tests/configuration/server.key" ) ,
192+ tls_key_password = Path ( "tests/configuration/password" ) ,
193193 )
194194 assert cfg is not None
195195 assert cfg .tls_certificate_path == Path ("tests/configuration/server.crt" )
@@ -201,59 +201,59 @@ def test_tls_configuration_wrong_certificate_path() -> None:
201201 """Test the TLS configuration loading when some path is broken."""
202202 with pytest .raises (ValueError , match = "Path does not point to a file" ):
203203 TLSConfiguration (
204- tls_certificate_path = "this-is-wrong" ,
205- tls_key_path = "tests/configuration/server.key" ,
206- tls_key_password = "tests/configuration/password" ,
204+ tls_certificate_path = Path ( "this-is-wrong" ) ,
205+ tls_key_path = Path ( "tests/configuration/server.key" ) ,
206+ tls_key_password = Path ( "tests/configuration/password" ) ,
207207 )
208208
209209
210210def test_tls_configuration_wrong_key_path () -> None :
211211 """Test the TLS configuration loading when some path is broken."""
212212 with pytest .raises (ValueError , match = "Path does not point to a file" ):
213213 TLSConfiguration (
214- tls_certificate_path = "tests/configurationserver.crt" ,
215- tls_key_path = "this-is-wrong" ,
216- tls_key_password = "tests/configuration/password" ,
214+ tls_certificate_path = Path ( "tests/configurationserver.crt" ) ,
215+ tls_key_path = Path ( "this-is-wrong" ) ,
216+ tls_key_password = Path ( "tests/configuration/password" ) ,
217217 )
218218
219219
220220def test_tls_configuration_wrong_password_path () -> None :
221221 """Test the TLS configuration loading when some path is broken."""
222222 with pytest .raises (ValueError , match = "Path does not point to a file" ):
223223 TLSConfiguration (
224- tls_certificate_path = "tests/configurationserver.crt" ,
225- tls_key_path = "tests/configuration/server.key" ,
226- tls_key_password = "this-is-wrong" ,
224+ tls_certificate_path = Path ( "tests/configurationserver.crt" ) ,
225+ tls_key_path = Path ( "tests/configuration/server.key" ) ,
226+ tls_key_password = Path ( "this-is-wrong" ) ,
227227 )
228228
229229
230230def test_tls_configuration_certificate_path_to_directory () -> None :
231231 """Test the TLS configuration loading when some path points to a directory."""
232232 with pytest .raises (ValueError , match = "Path does not point to a file" ):
233233 TLSConfiguration (
234- tls_certificate_path = "tests/" ,
235- tls_key_path = "tests/configuration/server.key" ,
236- tls_key_password = "tests/configuration/password" ,
234+ tls_certificate_path = Path ( "tests/" ) ,
235+ tls_key_path = Path ( "tests/configuration/server.key" ) ,
236+ tls_key_password = Path ( "tests/configuration/password" ) ,
237237 )
238238
239239
240240def test_tls_configuration_key_path_to_directory () -> None :
241241 """Test the TLS configuration loading when some path points to a directory."""
242242 with pytest .raises (ValueError , match = "Path does not point to a file" ):
243243 TLSConfiguration (
244- tls_certificate_path = "tests/configurationserver.crt" ,
245- tls_key_path = "tests/" ,
246- tls_key_password = "tests/configuration/password" ,
244+ tls_certificate_path = Path ( "tests/configurationserver.crt" ) ,
245+ tls_key_path = Path ( "tests/" ) ,
246+ tls_key_password = Path ( "tests/configuration/password" ) ,
247247 )
248248
249249
250250def test_tls_configuration_password_path_to_directory () -> None :
251251 """Test the TLS configuration loading when some path points to a directory."""
252252 with pytest .raises (ValueError , match = "Path does not point to a file" ):
253253 TLSConfiguration (
254- tls_certificate_path = "tests/configurationserver.crt" ,
255- tls_key_path = "tests/configuration/server.key" ,
256- tls_key_password = "tests/" ,
254+ tls_certificate_path = Path ( "tests/configurationserver.crt" ) ,
255+ tls_key_path = Path ( "tests/configuration/server.key" ) ,
256+ tls_key_password = Path ( "tests/" ) ,
257257 )
258258
259259
@@ -283,13 +283,13 @@ def test_model_context_protocol_server_required_fields() -> None:
283283 """Test that ModelContextProtocolServer requires name and url."""
284284
285285 with pytest .raises (ValidationError ):
286- ModelContextProtocolServer ()
286+ ModelContextProtocolServer () # pyright: ignore
287287
288288 with pytest .raises (ValidationError ):
289- ModelContextProtocolServer (name = "test-server" )
289+ ModelContextProtocolServer (name = "test-server" ) # pyright: ignore
290290
291291 with pytest .raises (ValidationError ):
292- ModelContextProtocolServer (url = "http://localhost:8080" )
292+ ModelContextProtocolServer (url = "http://localhost:8080" ) # pyright: ignore
293293
294294
295295def test_configuration_empty_mcp_servers () -> None :
0 commit comments