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

This commit is contained in:
2025-08-15 11:06:39 +02:00
parent 0e05ad56bf
commit 9ce55d3aa9
+5 -5
View File
@@ -16,7 +16,7 @@ def test_get_default_elog_instance_with_direct_password_and_real_check():
password = "testpassword"
text = "This is a message1"
elog = Elog("http://localhost:8080/demo", user=user, password=password, encrypt_pwd=False)
elog = Elog("http://localhost:8080/demo", user=user, password=password)
try:
elog.post(text)
@@ -41,7 +41,7 @@ def test_get_default_elog_instance_with_wrong_password_and_real_check():
wrong_password = "wrongpassword"
with pytest.raises(LogbookAuthenticationError):
Elog(url, user=user, password=wrong_password, encrypt_pwd=False)
Elog(url, user=user, password=wrong_password)
@patch("slic.utils.elog.getpass")
@@ -53,7 +53,7 @@ def test_get_default_elog_instance_asks_password_and_opens(mock_home, mock_getpa
text = "This is a message2"
url = "http://localhost:8080/demo"
elog = Elog("http://localhost:8080/demo", user=user, encrypt_pwd=False)
elog = Elog("http://localhost:8080/demo", user=user)
try:
elog.post(text)
@@ -88,7 +88,7 @@ def test_get_default_elog_with_path_home(mock_home, mock_getuser, mock_getpass):
mock_home.return_value = tmp_home
try:
elog = Elog("http://localhost:8080/demo", encrypt_pwd=False)
elog = Elog("http://localhost:8080/demo")
try:
elog.post(text)
except Exception as e:
@@ -128,7 +128,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", encrypt_pwd=False)
elog = elog = Elog("http://localhost:8080/demo", user="robot", password="testpassword")
test_msg = "SCREENSHOT_INTEGRATION_TEST_MSG_456"
elog.screenshot(message=test_msg)