Ejemplo n.º 1
0
    def test_update_message_works(self, mock_slack_api_call):
        mock_slack_api_call.return_value = {
            "ok": "true",
            "channel": "Eat",
            "text": "Hi again"
        }

        slack_helper = SlackHelper()

        assert slack_helper.update_message(
            msg="Hi", recipient="Roger").get("ok") == "true"
        assert slack_helper.update_message(
            msg="Hi", recipient="Roger").get("channel") == "Eat"
        assert slack_helper.update_message(
            msg="Hi", recipient="Roger").get("text") == "Hi again"
Ejemplo n.º 2
0
    def test_update_message_works(self, mock_slack_api_call):
        mock_slack_api_call.return_value = {
            "ok": "true",
            "channel": "Eat",
            "text": "Hi again"
        }

        slack_helper = SlackHelper()

        assert slack_helper.update_message(
            message="Hi", channel="Roger",
            ts="1405894322.002768").get("ok") == "true"
        assert slack_helper.update_message(
            message="Hi", channel="Roger",
            ts="1405894322.002768").get("channel") == "Eat"
        assert slack_helper.update_message(
            message="Hi", channel="Roger",
            ts="1405894322.002768").get("text") == "Hi again"