@@ -27,13 +27,6 @@ def setUp(self):
2727 def tearDown (self ):
2828 pass
2929
30- def test_legacy (self ):
31- client = self .legacy_client
32-
33- response = client .admin_analytics_getFile (date = "2020-10-20" , type = "member" )
34- self .assertTrue (isinstance (response .data , bytes ))
35- self .assertIsNotNone (response .data )
36-
3730 def test_sync (self ):
3831 client = self .sync_client
3932
@@ -50,6 +43,24 @@ def test_sync_error(self):
5043 self .assertFalse (e .response ["ok" ])
5144 self .assertEqual ("file_not_yet_available" , e .response ["error" ])
5245
46+ def test_sync_public_channel (self ):
47+ client = self .sync_client
48+
49+ response = client .admin_analytics_getFile (
50+ date = "2020-10-20" , type = "public_channel"
51+ )
52+ self .assertTrue (isinstance (response .data , bytes ))
53+ self .assertIsNotNone (response .data )
54+
55+ def test_sync_public_channel_medata_only (self ):
56+ client = self .sync_client
57+
58+ response = client .admin_analytics_getFile (
59+ type = "public_channel" , metadata_only = True
60+ )
61+ self .assertTrue (isinstance (response .data , bytes ))
62+ self .assertIsNotNone (response .data )
63+
5364 @async_test
5465 async def test_async (self ):
5566 client = self .async_client
@@ -69,3 +80,49 @@ async def test_async_error(self):
6980 except SlackApiError as e :
7081 self .assertFalse (e .response ["ok" ])
7182 self .assertEqual ("file_not_yet_available" , e .response ["error" ])
83+
84+ @async_test
85+ async def test_async_public_channel (self ):
86+ client = self .async_client
87+
88+ response = await client .admin_analytics_getFile (
89+ date = "2020-10-20" , type = "public_channel"
90+ )
91+ self .assertTrue (isinstance (response .data , bytes ))
92+ self .assertIsNotNone (response .data )
93+
94+ @async_test
95+ async def test_async_public_channel_metadata_only (self ):
96+ client = self .async_client
97+
98+ response = await client .admin_analytics_getFile (
99+ type = "public_channel" ,
100+ metadata_only = True ,
101+ )
102+ self .assertTrue (isinstance (response .data , bytes ))
103+ self .assertIsNotNone (response .data )
104+
105+ def test_legacy (self ):
106+ client = self .legacy_client
107+
108+ response = client .admin_analytics_getFile (date = "2020-10-20" , type = "member" )
109+ self .assertTrue (isinstance (response .data , bytes ))
110+ self .assertIsNotNone (response .data )
111+
112+ def test_legacy_public_channel (self ):
113+ client = self .legacy_client
114+
115+ response = client .admin_analytics_getFile (
116+ date = "2020-10-20" , type = "public_channel"
117+ )
118+ self .assertTrue (isinstance (response .data , bytes ))
119+ self .assertIsNotNone (response .data )
120+
121+ def test_legacy_public_channel_metadata_only (self ):
122+ client = self .legacy_client
123+
124+ response = client .admin_analytics_getFile (
125+ type = "public_channel" , metadata_only = True
126+ )
127+ self .assertTrue (isinstance (response .data , bytes ))
128+ self .assertIsNotNone (response .data )
0 commit comments