Skip to content

Commit

Permalink
assert error
Browse files Browse the repository at this point in the history
  • Loading branch information
enola-dkfz committed Dec 8, 2023
1 parent ae673ec commit 41d5fff
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,8 @@ mod test {
const EXAMPLE_MEASURE_REPORT_BBMRI: &str =
include_str!("../resources/measure_report_bbmri.json");
const EXAMPLE_MEASURE_REPORT_DKTK: &str = include_str!("../resources/measure_report_dktk.json");
const EXAMPLE_MEASURE_REPORT_EXLIQUID: &str = include_str!("../resources/test/measure_report_exliquid.json");
const EXAMPLE_MEASURE_REPORT_EXLIQUID: &str =
include_str!("../resources/test/measure_report_exliquid.json");

const DELTA_PATIENT: f64 = 1.;
const DELTA_SPECIMEN: f64 = 20.;
Expand Down Expand Up @@ -592,9 +593,6 @@ mod test {
}

#[test]
#[should_panic(
expected = r#"called `Result::unwrap()` on an `Err` value: DeserializationError("missing field `text` at line 42 column 13. Is obfuscation turned on when it shouldn't be? Is the metadata in the task formatted correctly, like this {\"project\": \"name\"}? Are there any other projects stated in the projects_no_obfuscation parameter in the bridgehead?")"#
)]
fn test_obfuscate_counts_bad_measure() {
let mut obf_cache = ObfCache {
cache: HashMap::new(),
Expand All @@ -611,7 +609,10 @@ mod test {
DELTA_MEDICATION_STATEMENTS,
EPSILON,
ROUNDING_STEP,
)
.unwrap();
);

assert!(
obfuscated_json.is_err(),
r#"called `Result::unwrap()` on an `Err` value: DeserializationError("missing field `text` at line 42 column 13. Is obfuscation turned on when it shouldn't be? Is the metadata in the task formatted correctly, like this {{\"project\": \"name\"}}? Are there any other projects stated in the projects_no_obfuscation parameter in the bridgehead?")"#);
}
}

0 comments on commit 41d5fff

Please sign in to comment.