We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9639eb3 commit ea6f490Copy full SHA for ea6f490
tests/test_slackrequest.py
@@ -17,6 +17,18 @@ def test_post_file(mocker):
17
'token': 'xoxb-123'} == kwargs['data']
18
assert None != kwargs['files']
19
20
+def test_get_file(mocker):
21
+ requests = mocker.patch('slackclient._slackrequest.requests')
22
+
23
+ SlackRequest.do('xoxb-123', 'files.info', {'file': 'myFavoriteFileID'})
24
25
+ assert requests.post.call_count == 1
26
+ args, kwargs = requests.post.call_args
27
+ assert 'https://slack.com/api/files.info' == args[0]
28
+ assert {'file': "myFavoriteFileID",
29
+ 'token': 'xoxb-123'} == kwargs['data']
30
+ assert None == kwargs['files']
31
32
def test_post_attachements(mocker):
33
requests = mocker.patch('slackclient._slackrequest.requests')
34
0 commit comments