diff --git a/src/ert/ensemble_evaluator/config.py b/src/ert/ensemble_evaluator/config.py index 79c127cccdb..e2c4c63a285 100644 --- a/src/ert/ensemble_evaluator/config.py +++ b/src/ert/ensemble_evaluator/config.py @@ -8,7 +8,7 @@ import typing import warnings from base64 import b64encode -from datetime import datetime, timedelta +from datetime import UTC, datetime, timedelta from typing import Optional from cryptography import x509 @@ -71,8 +71,8 @@ def _generate_certificate( .issuer_name(issuer) .public_key(key.public_key()) .serial_number(x509.random_serial_number()) - .not_valid_before(datetime.utcnow()) - .not_valid_after(datetime.utcnow() + timedelta(days=365)) # 1 year + .not_valid_before(datetime.now(UTC)) + .not_valid_after(datetime.now(UTC) + timedelta(days=365)) # 1 year .add_extension( x509.SubjectAlternativeName( [ diff --git a/tests/ert/unit_tests/ensemble_evaluator/ensemble_evaluator_utils.py b/tests/ert/unit_tests/ensemble_evaluator/ensemble_evaluator_utils.py index 6d15180ce41..a6c38dc6fa4 100644 --- a/tests/ert/unit_tests/ensemble_evaluator/ensemble_evaluator_utils.py +++ b/tests/ert/unit_tests/ensemble_evaluator/ensemble_evaluator_utils.py @@ -23,7 +23,7 @@ def _mock_ws(host, port, messages, delay_startup=0): loop = new_event_loop() done = loop.create_future() - async def _handler(websocket, path): + async def _handler(websocket): while True: msg = await websocket.recv() messages.append(msg) diff --git a/tests/ert/unit_tests/gui/tools/plot/test_plot_api.py b/tests/ert/unit_tests/gui/tools/plot/test_plot_api.py index 49ebfddd3a4..1a1bdc0c436 100644 --- a/tests/ert/unit_tests/gui/tools/plot/test_plot_api.py +++ b/tests/ert/unit_tests/gui/tools/plot/test_plot_api.py @@ -186,7 +186,7 @@ def test_plot_api_request_errors(api): def api_and_storage(monkeypatch, tmp_path): with open_storage(tmp_path / "storage", mode="w") as storage: monkeypatch.setenv("ERT_STORAGE_NO_TOKEN", "yup") - monkeypatch.setenv("ERT_STORAGE_ENS_PATH", storage.path) + monkeypatch.setenv("ERT_STORAGE_ENS_PATH", str(storage.path)) api = PlotApi() yield api, storage if enkf._storage is not None: