Kill the mutants of the notifier's help, its env-file check, its config lookup and Slack's quoting

This commit is contained in:
2026-11-15 00:26:27 +01:00
parent ad70ec6dad
commit eb692daee2
2 changed files with 23 additions and 0 deletions
+5
View File
@@ -56,6 +56,11 @@ class Send(unittest.TestCase):
self.assertIsNone(dm.send(CONFIG, "Use <b> & [<setting>]?", slack))
self.assertEqual(slack.requests[0][3], {"channel": "U0123ABCD", "text": "Use &lt;b&gt; &amp; [&lt;setting&gt;]?"})
def test_leaves_quotes_as_they_are_since_slack_reads_only_three_characters_as_control(self):
slack = Slack({"ok": True})
self.assertIsNone(dm.send(CONFIG, "Use \"a\" or 'b'?", slack))
self.assertEqual(slack.requests[0][3]["text"], "Use \"a\" or 'b'?")
def test_fails_naming_slacks_error_code_where_slack_answers_ok_false(self):
self.assertEqual(dm.send(CONFIG, "hi", Slack({"ok": False, "error": "invalid_auth"})), Failure("POST /api/chat.postMessage refused the message: invalid_auth"))