INNER CODE UNIT · Rust

test_account_from_env_demo_success

pbeets/rithmic-rs · src/config.rs:861

    fn test_account_from_env_demo_success() {
        temp_env::with_vars(demo_env_vars(), || {
            let account = RithmicAccount::from_env(RithmicEnv::Demo).unwrap();

            assert_eq!(account.account_id, "test_account");
            assert_eq!(account.fcm_id, "test_fcm");
            assert_eq!(account.ib_id, "test_ib");
        });
    }

    #[test]
    fn from_env_reads_the_request_timeout_when_set() {
        let mut vars = demo_env_vars();
        vars.push((REQUEST_TIMEOUT_VAR, Some("5")));

        temp_env::with_vars(vars, || {
            let config = RithmicConfig::from_env(RithmicEnv::Demo).unwrap();

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…