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

This commit is contained in:
2025-08-07 13:08:47 +02:00
parent 02c3b857f6
commit 0aa8dfefc4
+20
View File
@@ -26,6 +26,26 @@ def get_default_elog_password(url, **kwargs):
kwargs["password"] = pw
return kwargs["password"]
def test_post_local():
logbook = elog.open(
hostname="http://localhost",
port=8080,
user="robot",
password="testpassword",
use_ssl=False,
logbook="demo"
)
attributes = {
"Author": "robot",
"Subject": "Test simple",
"Category": "General",
"Type": "Note"
}
message = "Hello from local test"
msg_id = logbook.post(message, attributes=attributes, encoding="HTML")
print("✅ Posted with msg_id =", msg_id)
# Connexion basique avec credentials connus
def get_test_elog():
return Elog("http://localhost:8080/demo", user="robot", password="testpassword")