improve error message

This commit is contained in:
HgO 2022-07-12 00:29:46 +02:00
parent 1e006cb66f
commit cd196c2143
2 changed files with 3 additions and 3 deletions

View file

@ -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

View file

@ -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")