fix test errs
This commit is contained in:
+8
-8
@@ -442,7 +442,7 @@ mod tests {
|
|||||||
maps.insert(
|
maps.insert(
|
||||||
DIM_MONTH.to_string(),
|
DIM_MONTH.to_string(),
|
||||||
HashMap::from([
|
HashMap::from([
|
||||||
("Toskur".to_string(), "Januar 2015".to_string()),
|
("2015M01".to_string(), "Januar 2015".to_string()),
|
||||||
("2015M02".to_string(), "Februar 2015".to_string()),
|
("2015M02".to_string(), "Februar 2015".to_string()),
|
||||||
]),
|
]),
|
||||||
);
|
);
|
||||||
@@ -466,7 +466,7 @@ mod tests {
|
|||||||
#[test]
|
#[test]
|
||||||
fn test_build_query_uses_correct_dimension_codes() {
|
fn test_build_query_uses_correct_dimension_codes() {
|
||||||
let months = vec!["2015M01".to_string(), "2015M02".to_string()];
|
let months = vec!["2015M01".to_string(), "2015M02".to_string()];
|
||||||
let query = build_query(&months);
|
let query = build_query(&months).unwrap();
|
||||||
|
|
||||||
assert_eq!(query.response.format, "json-stat2");
|
assert_eq!(query.response.format, "json-stat2");
|
||||||
assert_eq!(query.query.len(), 8);
|
assert_eq!(query.query.len(), 8);
|
||||||
@@ -505,6 +505,12 @@ mod tests {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_build_query_returns_error_on_empty() {
|
||||||
|
let result = build_query(&[]);
|
||||||
|
assert!(result.is_err());
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_decode_key_indices_basic() {
|
fn test_decode_key_indices_basic() {
|
||||||
let key_sizes = vec![2, 2, 2];
|
let key_sizes = vec![2, 2, 2];
|
||||||
@@ -676,12 +682,6 @@ mod tests {
|
|||||||
assert!(months.is_empty());
|
assert!(months.is_empty());
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
|
||||||
#[should_panic(expected = "requires at least one month")]
|
|
||||||
fn test_build_query_empty_panics() {
|
|
||||||
let _ = build_query(&[]);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_variable_meta_lookup_map() {
|
fn test_variable_meta_lookup_map() {
|
||||||
let var = VariableMeta {
|
let var = VariableMeta {
|
||||||
|
|||||||
Reference in New Issue
Block a user