This commit is contained in:
@@ -42,8 +42,8 @@ def test_get_default_elog_instance_with_wrong_password_and_real_check():
|
||||
|
||||
@patch("slic.utils.elog.getpass")
|
||||
@patch("slic.utils.elog.Path.home")
|
||||
def test_get_default_elog_instance_asks_password_and_opens(mock_home, mock_getpass):
|
||||
mock_home.return_value = Path("/does/not/exist") # Fausse home → lecture échoue
|
||||
def test_get_default_elog_instance_asks_password(mock_home, mock_getpass):
|
||||
mock_home.return_value = Path("/does/not/exist")
|
||||
mock_getpass.return_value = "testpassword"
|
||||
user = "robot"
|
||||
text = "This is a message2"
|
||||
@@ -56,11 +56,6 @@ def test_get_default_elog_instance_asks_password_and_opens(mock_home, mock_getpa
|
||||
except Exception as 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.post() raised an unexpected exception: {e}")
|
||||
|
||||
message, attributes, attachments = elog.read(msg_id)
|
||||
|
||||
assert text in message
|
||||
|
||||
Reference in New Issue
Block a user