improve error message
This commit is contained in:
parent
1e006cb66f
commit
cd196c2143
2 changed files with 3 additions and 3 deletions
|
@ -97,7 +97,7 @@ class Command:
|
|||
await send_text_to_room(
|
||||
self.client,
|
||||
self.room.room_id,
|
||||
f"I tried really hard, but I can't convert this duration to a number of seconds: {duration}.",
|
||||
f"I tried really hard, but I can't convert the duration '{duration}' to a number of seconds.",
|
||||
)
|
||||
return
|
||||
|
||||
|
|
|
@ -402,7 +402,7 @@ class CommandTestCase(unittest.IsolatedAsyncioTestCase):
|
|||
self.fake_cache,
|
||||
self.fake_alertmanager,
|
||||
self.fake_config,
|
||||
"ack duration",
|
||||
"ack invalid duration",
|
||||
self.fake_room,
|
||||
self.fake_sender,
|
||||
self.fake_event_id,
|
||||
|
@ -415,7 +415,7 @@ class CommandTestCase(unittest.IsolatedAsyncioTestCase):
|
|||
fake_send_text_to_room.assert_called_once_with(
|
||||
self.fake_client,
|
||||
self.fake_room.room_id,
|
||||
"I tried really hard, but I can't convert this duration to a number of seconds: duration.",
|
||||
"I tried really hard, but I can't convert the duration 'invalid duration' to a number of seconds.",
|
||||
)
|
||||
|
||||
@patch.object(matrix_alertbot.command, "send_text_to_room")
|
||||
|
|
Loading…
Reference in a new issue