Closed amjltc295 closed 6 years ago
👍
👍
This could use a test...
def test_init_with_timeout():
client = SlackClient(None, connect=False)
assert client.webapi.api.timeout == 10 # seconds default timeout
expected_timeout = 42 # seconds
client = SlackClient(None, connect=False, timeout=expected_timeout)
assert client.webapi.api.timeout == expected_timeout
add to tests/unit/test_slackclient.py
@townie Thanks, I have added the test and rebased it on the latest develop.
Thanks!
There are serveral parameters for slacker:
However, in the previous code, only token is passed to slacker, and timeout could not be set. It uses DEFAULT_TIMEOUT in slacker, which is 10 seconds, not enough for slackbot to upload large file (20MB video for example). In this commit, timeout could be set in settings as token. Bot() would pass it to SlackClient and to Slacker if TIMEOUT exists in settings.