Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python_tests/filter_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def timeseries_corpus(sync_client, datasets, prefix, token):
),
"pump_x1": dict(
external_id=f"{prefix}_ts_pumpX1", name=f"Pump Beta {token}",
unit="celsius", unit_external_id="temperature_c", value_type="float",
unit="celsius", unit_external_id="temperature_deg_c", value_type="float",
data_set_id=child.id,
metadata={f"tsk_{token}": "beta", f"tsshared_{token}": "yes"},
),
Expand Down
2 changes: 1 addition & 1 deletion python_tests/test_filter_timeseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def test_unit_external_ids_are_a_pattern_list(flt, timeseries_corpus):
assert flt(unit_external_id=["pressure_bar"]) == {
timeseries_corpus["pump_1"].external_id, timeseries_corpus["valve"].external_id
}
assert flt(unit_external_id=["pressure_*", "temperature_c"]) == {
assert flt(unit_external_id=["pressure_*", "temperature_deg_c"]) == {
ts.external_id for ts in timeseries_corpus.values()
}

Expand Down
10 changes: 4 additions & 6 deletions python_tests/test_timeseries_crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def _refetch(sync_client, ts):
{"value_type": "float", "metadata": {}},
{"value_type": "float", "metadata": {"empty_value": ""}},
{"value_type": "float", "description": "a described series"},
{"value_type": "float", "unit": "m/s", "unit_external_id": "ext.unit.id"},
{"value_type": "float", "unit": "bar", "unit_external_id": "pressure_bar"},
{"value_type": "float", "name": "Unicode ✓ 日本語 name"},
{"value_type": "float", "source": "sap_pi"},
],
Expand Down Expand Up @@ -144,17 +144,15 @@ def test_delete_by_external_id_string(sync_client):
("unit", "Updated Unit", "unit"),
("description", "Updated Description", "description"),
("source", "updated_source", "source"),
# unit_external_id is sanitised server-side (dots -> underscores), so the
# value here is already in canonical form to keep the assertion exact.
("unit_external_id", "updated_unit_ext", "unit_external_id"),
("unit_external_id", "pressure_bar", "unit_external_id"),
],
)
def test_update_scalar_str_set_value(sync_client, make_ts, field, new_value, attr):
ts = make_ts(
name="Original",
description="original description",
unit="a.u",
unit_external_id="orig_unit_ext",
unit_external_id="temperature_deg_c",
source="original_source",
)

Expand Down Expand Up @@ -202,7 +200,7 @@ def test_update_scalar_str_set_null(sync_client, make_ts, field, attr):
ts = make_ts(
description="please clear me",
unit="a.u",
unit_external_id="clear.this.ext",
unit_external_id="temperature_deg_c",
source="please_clear_me",
)

Expand Down
2 changes: 1 addition & 1 deletion src/resources/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,7 @@ async fn graph_projection_is_one_to_one_and_typed() -> Result<(), Box<dyn std::e

let mut ts = TimeSeries::new(&ts_ext, "GP TS");
ts.set_unit("deg C")
.set_unit_external_id("celsius")
.set_unit_external_id("temperature_deg_c")
.set_description("ts description")
.set_data_set_id(ds_id)
.set_metadata(hashmap! {"tk".to_string() => "tv".to_string()});
Expand Down
Loading