This commit is contained in:
@@ -26,6 +26,26 @@ def get_default_elog_password(url, **kwargs):
|
|||||||
kwargs["password"] = pw
|
kwargs["password"] = pw
|
||||||
return kwargs["password"]
|
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
|
# Connexion basique avec credentials connus
|
||||||
def get_test_elog():
|
def get_test_elog():
|
||||||
return Elog("http://localhost:8080/demo", user="robot", password="testpassword")
|
return Elog("http://localhost:8080/demo", user="robot", password="testpassword")
|
||||||
|
|||||||
Reference in New Issue
Block a user