From 3321a50f31e31d4da0cb538563c4e7bbe4e1dbce Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Wed, 4 Sep 2024 16:13:49 +0200 Subject: [PATCH 1/2] ci: run unit tests in ubuntu-24.04 github actions environment as well --- .github/workflows/unit-test.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/unit-test.yaml b/.github/workflows/unit-test.yaml index 154bd1c7..b53e53c0 100644 --- a/.github/workflows/unit-test.yaml +++ b/.github/workflows/unit-test.yaml @@ -46,6 +46,9 @@ jobs: - name: "Ubuntu 22.04, Py 3.10" ubuntu_version: "22.04" python_version: "3.10" + - name: "Ubuntu 24.04, Py 3.12" + ubuntu_version: "24.04" + python_version: "3.12" steps: - uses: actions/checkout@v4 From b034fc6713f563c10e1fc351f9a01b6ea4378826 Mon Sep 17 00:00:00 2001 From: Min RK Date: Thu, 5 Sep 2024 11:07:22 +0200 Subject: [PATCH 2/2] fix calls to assert_called_with it's not `assert ...called_with` --- tests/test_config.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_config.py b/tests/test_config.py index c091060c..72cf65e3 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -147,8 +147,8 @@ def test_reload_hub(): "tljh.systemd.check_service_active" ) as check_active, mock.patch("tljh.config.check_hub_ready") as check_ready: config.reload_component("hub") - assert restart_service.called_with("jupyterhub") - assert check_active.called_with("jupyterhub") + restart_service.assert_called_with("jupyterhub") + check_active.assert_called_with("jupyterhub") def test_reload_proxy(tljh_dir): @@ -156,8 +156,8 @@ def test_reload_proxy(tljh_dir): "tljh.systemd.check_service_active" ) as check_active: config.reload_component("proxy") - assert restart_service.called_with("traefik") - assert check_active.called_with("traefik") + restart_service.assert_called_with("traefik") + check_active.assert_called_with("traefik") assert os.path.exists(os.path.join(config.STATE_DIR, "traefik.toml"))