浏览代码

[slack] Test postMessage call with assert_call_with()

Harshg999 4 年之前
父节点
当前提交
c53d91533b
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      desktop/core/src/desktop/lib/botserver/views_tests.py

+ 1 - 0
desktop/core/src/desktop/lib/botserver/views_tests.py

@@ -46,4 +46,5 @@ class TestBotServer(unittest.TestCase):
         "ok": True
       }
       response = say_hi_user("channel", "user_id")
+      api_call.assert_called_with(api_method='chat.postMessage', json={'channel': 'channel', 'text': 'Hi <@user_id> :wave:'})
       assert_true(response['ok'])