From 92c3dc538e4556ca4b9b6be204e0660f23aef656 Mon Sep 17 00:00:00 2001 From: tligui_y Date: Fri, 15 Aug 2025 16:53:53 +0200 Subject: [PATCH] Update tests/test_utils_elog.py --- tests/test_utils_elog.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/test_utils_elog.py b/tests/test_utils_elog.py index 85d405ce..0c6af185 100644 --- a/tests/test_utils_elog.py +++ b/tests/test_utils_elog.py @@ -21,7 +21,7 @@ def test_get_default_elog_instance_with_direct_password_and_real_check(): try: msg_id = elog.post(text) except Exception as e: - pytest.fail(f"elog.open() raised an unexpected exception: {e}") + pytest.fail(f"elog.post() raised an unexpected exception: {e}") message, attributes, attachments = elog.read(msg_id) @@ -36,7 +36,7 @@ def test_get_default_elog_instance_with_wrong_password_and_real_check(): elog = Elog(url, user=user, password=wrong_password) - with pytest.raises(LogbookAuthenticationError): + with pytest.raises(Exception): elog.post("Should fail because wrong password") @@ -54,12 +54,12 @@ def test_get_default_elog_instance_asks_password_and_opens(mock_home, mock_getpa try: msd_id = elog.post(text) except Exception as e: - pytest.fail(f"elog.open() raised an unexpected exception: {e}") + pytest.fail(f"elog.post() raised an unexpected exception: {e}") try: msg_id = elog.post(text) except Exception as e: - pytest.fail(f"elog.open() raised an unexpected exception: {e}") + pytest.fail(f"elog.post() raised an unexpected exception: {e}") message, attributes, attachments = elog.read(msg_id) @@ -89,7 +89,7 @@ def test_get_default_elog_with_path_home(mock_home, mock_getuser, mock_getpass): try: msg_id = elog.post(text) except Exception as e: - pytest.fail(f"elog.open() raised an unexpected exception: {e}") + pytest.fail(f"elog.post() raised an unexpected exception: {e}") message, attributes, attachments = elog.read(msg_id) @@ -110,7 +110,7 @@ def test_screenshot(mock_screenshot_class): mock_instance = mock_screenshot_class.return_value mock_instance.shoot.return_value = [fake_path] - elog = elog = Elog("http://localhost:8080/demo", user="robot", password="testpassword") + elog = Elog("http://localhost:8080/demo", user="robot", password="testpassword") test_msg = "SCREENSHOT_INTEGRATION_TEST_MSG_456" msg_id = elog.screenshot(message=test_msg)