| 217 | } |
| 218 | |
| 219 | fn python_settings<'py>(py: Python<'py>, overrides: &str) -> Snapshot<'py> { |
| 220 | let source = format!( |
| 221 | " |
| 222 | import types |
| 223 | defaults = dict( |
| 224 | ssl_verify=True, |
| 225 | ssl_certificate=None, |
| 226 | ssl_security_level=None, |
| 227 | ssl_ecdh_curve=None, |
| 228 | force_ipv4=False, |
| 229 | http2=False, |
| 230 | aiohttp_trust_env=False, |
| 231 | disable_aiohttp_trust_env=False, |
| 232 | disable_aiohttp_transport=False, |
| 233 | user_agent='litellm/test', |
| 234 | ) |
| 235 | defaults.update(dict({overrides})) |
| 236 | settings = types.SimpleNamespace(**defaults) |
| 237 | " |
| 238 | ); |
| 239 | let locals = PyDict::new(py); |
| 240 | let source = std::ffi::CString::new(source).unwrap(); |
| 241 | py.run(&source, Some(&locals), Some(&locals)).unwrap(); |
| 242 | PythonSettings::Http.snapshot(locals.get_item("settings").unwrap().unwrap()) |
| 243 | } |
| 244 | |
| 245 | #[test] |
| 246 | fn default_python_settings_resolve_to_default_settings_with_verification_on() { |