Explorar o código

[slack] Test postMessage call with assert_call_with()

Harshg999 %!s(int64=4) %!d(string=hai) anos
pai
achega
c53d91533b
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  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'])