Skip to content

Commit

Permalink
chore(deps): lock file maintenance (#1949)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: erlendvollset <[email protected]>
  • Loading branch information
renovate[bot] and erlendvollset authored Sep 30, 2024
1 parent 570672b commit 970fedb
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 48 deletions.
93 changes: 51 additions & 42 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions tests/tests_integration/test_api/test_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,10 @@ def test_upload_multipart(self, cognite_client: CogniteClient) -> None:
def test_create_retrieve_update_delete_with_instance_id(
self, cognite_client: CogniteClient, instance_id_test_space: str
) -> None:
exernal_id = "file_python_sdk_instance_id_tests" + random_string(10)
file = CogniteFileApply(
space=instance_id_test_space,
external_id="file_python_sdk_instance_id_tests",
external_id=exernal_id,
name="file_python_sdk_instance_id_tests",
description="This file was created by the Python SDK",
source_id="source:id",
Expand Down Expand Up @@ -288,10 +289,10 @@ def test_create_retrieve_update_delete_with_instance_id(

update_writable = retrieved.as_write()
update_writable.metadata = {"a": "b"}
update_writable.external_id = "file_python_sdk_instance_id_tests_updated"
update_writable.external_id = exernal_id + "updated"
updated_writable = cognite_client.files.update(update_writable)
assert updated_writable.metadata == {"a": "b"}
assert updated_writable.external_id == "file_python_sdk_instance_id_tests_updated"
assert updated_writable.external_id == exernal_id + "updated"

updated = cognite_client.files.update(FileMetadataUpdate(instance_id=instance_id).metadata.add({"c": "d"}))
assert updated.metadata == {"a": "b", "c": "d"}
Expand Down
7 changes: 4 additions & 3 deletions tests/tests_integration/test_api/test_time_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,10 @@ def test_aggregate_unique_metadata_keys(
def test_create_retrieve_update_delete_with_instance_id(
self, cognite_client: CogniteClient, instance_id_test_space: str, alpha_test_dataset: DataSet
) -> None:
external_id = "ts_python_sdk_instance_id_tests" + random_string(10)
my_ts = CogniteTimeSeriesApply(
space=instance_id_test_space,
external_id="ts_python_sdk_instance_id_tests",
external_id=external_id,
time_series_type="numeric",
is_step=False,
source_unit="pressure:psi",
Expand All @@ -300,12 +301,12 @@ def test_create_retrieve_update_delete_with_instance_id(

update_writable = retrieved.as_write()
update_writable.metadata = {"c": "d"}
update_writable.external_id = "ts_python_sdk_instance_id_tests"
update_writable.external_id = external_id
update_writable.data_set_id = alpha_test_dataset.id
updated_writable = cognite_client.time_series.update(update_writable)
assert updated_writable.metadata == {"c": "d"}
assert updated_writable.data_set_id == alpha_test_dataset.id
assert updated_writable.external_id == "ts_python_sdk_instance_id_tests"
assert updated_writable.external_id == external_id

updated = cognite_client.time_series.update(update)
assert updated.metadata == {"a": "b", "c": "d"}
Expand Down

0 comments on commit 970fedb

Please sign in to comment.