diff --git a/tests/test_utils_elog.py b/tests/test_utils_elog.py index 3cab562b2..9ca8b75cd 100644 --- a/tests/test_utils_elog.py +++ b/tests/test_utils_elog.py @@ -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")