()
| 82 | |
| 83 | #[test] |
| 84 | fn test_rename_key_present() { |
| 85 | Python::attach(|py| { |
| 86 | let original = WithRename { |
| 87 | first_name: "Bob".into(), |
| 88 | age: 30, |
| 89 | }; |
| 90 | let py_obj = pythonize(py, &original).unwrap(); |
| 91 | let dict = py_obj.cast::<PyDict>().unwrap(); |
| 92 | assert!(dict.get_item("firstName").unwrap().is_some()); |
| 93 | assert!(dict.get_item("first_name").unwrap().is_none()); |
| 94 | }); |
| 95 | } |
| 96 | |
| 97 | #[test] |
| 98 | fn test_rename_round_trip() { |
nothing calls this directly
no test coverage detected