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
6 changes: 4 additions & 2 deletions simvue/api/objects/grids.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"""

import http
import msgpack
import numpy
import typing

Expand Down Expand Up @@ -373,8 +374,9 @@ def _log_values(self, metrics: list[GridMetricSet]) -> None:

_response = sv_post(
url=f"{self._user_config.server.url}/{self.run_grids_endpoint(self._run_id)}",
headers=self._headers,
data=metrics,
headers=self._headers | {"Content-Type": "application/msgpack"},
data=msgpack.packb(metrics, use_bin_type=True),
is_json=False,
params={},
)

Expand Down
4 changes: 2 additions & 2 deletions tests/unit/test_grids.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def test_grid_creation_online() -> None:

@pytest.mark.api
@pytest.mark.offline
def test_grid_creation_offline() -> None:
def test_grid_creation_offline(offline_cache_setup) -> None:
_uuid: str = f"{uuid.uuid4()}".split("-")[0]
_folder_name = f"/simvue_unit_testing/{_uuid}"
_folder = Folder.new(path=_folder_name, offline=True)
Expand Down Expand Up @@ -141,7 +141,7 @@ def test_grid_metrics_creation_online() -> None:

@pytest.mark.api
@pytest.mark.offline
def test_grid_metrics_creation_offline() -> None:
def test_grid_metrics_creation_offline(offline_cache_setup) -> None:
_uuid: str = f"{uuid.uuid4()}".split("-")[0]
_folder_name = f"/simvue_unit_testing/{_uuid}"
_folder = Folder.new(path=_folder_name, offline=True)
Expand Down
Loading