Update tests/test_utils_elog.py
Run CI Tests / test (push) Successful in 1m58s

This commit is contained in:
2025-08-15 16:53:53 +02:00
parent 400ab42fe6
commit 92c3dc538e
+6 -6
View File
@@ -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)