Download codex-rs/app-server-protocol/src/protocol/v2/remote_control_tests.rs from SaylorTwift/codex: direct link, hf CLI and curl.
- Browser
- Download file 1.43 kB
-
https://huggingface.co/SaylorTwift/codex/resolve/main/codex-rs/app-server-protocol/src/protocol/v2/remote_control_tests.rs
- Command line
-
hf download hf://SaylorTwift/codex/codex-rs/app-server-protocol/src/protocol/v2/remote_control_tests.rs
-
curl -L -o remote_control_tests.rs https://huggingface.co/SaylorTwift/codex/resolve/main/codex-rs/app-server-protocol/src/protocol/v2/remote_control_tests.rs
1.43 kB
| use super::*; | |
| use pretty_assertions::assert_eq; | |
| use serde_json::json; | |
| fn remote_control_clients_list_params_serialize_nullable_optional_fields() { | |
| assert_eq!( | |
| serde_json::to_value(RemoteControlClientsListParams { | |
| environment_id: "env-123".to_string(), | |
| cursor: None, | |
| limit: None, | |
| order: None, | |
| }) | |
| .expect("params should serialize"), | |
| json!({ | |
| "environmentId": "env-123", | |
| "cursor": null, | |
| "limit": null, | |
| "order": null, | |
| }) | |
| ); | |
| } | |
| fn remote_control_clients_list_params_deserialize_camel_case_fields() { | |
| assert_eq!( | |
| serde_json::from_value::<RemoteControlClientsListParams>(json!({ | |
| "environmentId": "env-123", | |
| "cursor": "cursor-123", | |
| "limit": 10, | |
| "order": "asc", | |
| })) | |
| .expect("params should deserialize"), | |
| RemoteControlClientsListParams { | |
| environment_id: "env-123".to_string(), | |
| cursor: Some("cursor-123".to_string()), | |
| limit: Some(10), | |
| order: Some(RemoteControlClientsListOrder::Asc), | |
| } | |
| ); | |
| } | |
| fn remote_control_clients_revoke_response_serializes_as_empty_object() { | |
| assert_eq!( | |
| serde_json::to_value(RemoteControlClientsRevokeResponse {}) | |
| .expect("response should serialize"), | |
| json!({}) | |
| ); | |
| } | |