Kill the mutants of the notifier's help, its env-file check, its config lookup and Slack's quoting
This commit is contained in:
@@ -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 <b> & [<setting>]?"})
|
||||
|
||||
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"))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user