88@pytest .mark .incremental
99class TestChannel (object ):
1010 @pytest .mark .asyncio
11- async def test_ban_user (self , event_loop , channel , random_user , server_user ):
11+ async def test_ban_user (self , channel , random_user , server_user ):
1212 await channel .ban_user (random_user ["id" ], user_id = server_user ["id" ])
1313 await channel .ban_user (
1414 random_user ["id" ],
@@ -19,7 +19,7 @@ async def test_ban_user(self, event_loop, channel, random_user, server_user):
1919 await channel .unban_user (random_user ["id" ])
2020
2121 @pytest .mark .asyncio
22- async def test_create_without_id (self , event_loop , client , random_users ):
22+ async def test_create_without_id (self , client , random_users ):
2323 channel = client .channel (
2424 "messaging" , data = {"members" : [u ["id" ] for u in random_users ]}
2525 )
@@ -29,21 +29,21 @@ async def test_create_without_id(self, event_loop, client, random_users):
2929 assert channel .id is not None
3030
3131 @pytest .mark .asyncio
32- async def test_send_message_with_options (self , event_loop , channel , random_user ):
32+ async def test_send_message_with_options (self , channel , random_user ):
3333 response = await channel .send_message (
3434 {"text" : "hi" }, random_user ["id" ], skip_push = True
3535 )
3636 assert "message" in response
3737 assert response ["message" ]["text" ] == "hi"
3838
3939 @pytest .mark .asyncio
40- async def test_send_event (self , event_loop , channel , random_user ):
40+ async def test_send_event (self , channel , random_user ):
4141 response = await channel .send_event ({"type" : "typing.start" }, random_user ["id" ])
4242 assert "event" in response
4343 assert response ["event" ]["type" ] == "typing.start"
4444
4545 @pytest .mark .asyncio
46- async def test_send_reaction (self , event_loop , channel , random_user ):
46+ async def test_send_reaction (self , channel , random_user ):
4747 msg = await channel .send_message ({"text" : "hi" }, random_user ["id" ])
4848 response = await channel .send_reaction (
4949 msg ["message" ]["id" ], {"type" : "love" }, random_user ["id" ]
@@ -53,7 +53,7 @@ async def test_send_reaction(self, event_loop, channel, random_user):
5353 assert response ["message" ]["latest_reactions" ][0 ]["type" ] == "love"
5454
5555 @pytest .mark .asyncio
56- async def test_delete_reaction (self , event_loop , channel , random_user ):
56+ async def test_delete_reaction (self , channel , random_user ):
5757 msg = await channel .send_message ({"text" : "hi" }, random_user ["id" ])
5858 await channel .send_reaction (
5959 msg ["message" ]["id" ], {"type" : "love" }, random_user ["id" ]
@@ -65,13 +65,13 @@ async def test_delete_reaction(self, event_loop, channel, random_user):
6565 assert len (response ["message" ]["latest_reactions" ]) == 0
6666
6767 @pytest .mark .asyncio
68- async def test_update (self , event_loop , channel ):
68+ async def test_update (self , channel ):
6969 response = await channel .update ({"motd" : "one apple a day..." })
7070 assert "channel" in response
7171 assert response ["channel" ]["motd" ] == "one apple a day..."
7272
7373 @pytest .mark .asyncio
74- async def test_update_partial (self , event_loop , channel ):
74+ async def test_update_partial (self , channel ):
7575 response = await channel .update ({"color" : "blue" , "age" : 30 })
7676 assert "channel" in response
7777 assert response ["channel" ]["color" ] == "blue"
@@ -85,18 +85,18 @@ async def test_update_partial(self, event_loop, channel):
8585 assert "age" not in response ["channel" ]
8686
8787 @pytest .mark .asyncio
88- async def test_delete (self , event_loop , channel ):
88+ async def test_delete (self , channel ):
8989 response = await channel .delete ()
9090 assert "channel" in response
9191 assert response ["channel" ].get ("deleted_at" ) is not None
9292
9393 @pytest .mark .asyncio
94- async def test_truncate (self , event_loop , channel ):
94+ async def test_truncate (self , channel ):
9595 response = await channel .truncate ()
9696 assert "channel" in response
9797
9898 @pytest .mark .asyncio
99- async def test_truncate_with_options (self , event_loop , channel , random_user ):
99+ async def test_truncate_with_options (self , channel , random_user ):
100100 response = await channel .truncate (
101101 skip_push = True ,
102102 message = {
@@ -107,7 +107,7 @@ async def test_truncate_with_options(self, event_loop, channel, random_user):
107107 assert "channel" in response
108108
109109 @pytest .mark .asyncio
110- async def test_add_members (self , event_loop , channel , random_user ):
110+ async def test_add_members (self , channel , random_user ):
111111 response = await channel .remove_members ([random_user ["id" ]])
112112 assert len (response ["members" ]) == 0
113113
@@ -116,7 +116,7 @@ async def test_add_members(self, event_loop, channel, random_user):
116116 assert not response ["members" ][0 ].get ("is_moderator" , False )
117117
118118 @pytest .mark .asyncio
119- async def test_invite_members (self , event_loop , channel , random_user ):
119+ async def test_invite_members (self , channel , random_user ):
120120 response = await channel .remove_members ([random_user ["id" ]])
121121 assert len (response ["members" ]) == 0
122122
@@ -125,15 +125,15 @@ async def test_invite_members(self, event_loop, channel, random_user):
125125 assert response ["members" ][0 ].get ("invited" , True )
126126
127127 @pytest .mark .asyncio
128- async def test_add_moderators (self , event_loop , channel , random_user ):
128+ async def test_add_moderators (self , channel , random_user ):
129129 response = await channel .add_moderators ([random_user ["id" ]])
130130 assert response ["members" ][0 ]["is_moderator" ]
131131
132132 response = await channel .demote_moderators ([random_user ["id" ]])
133133 assert not response ["members" ][0 ].get ("is_moderator" , False )
134134
135135 @pytest .mark .asyncio
136- async def test_assign_roles_moderators (self , event_loop , channel , random_user ):
136+ async def test_assign_roles_moderators (self , channel , random_user ):
137137 member = {"user_id" : random_user ["id" ], "channel_role" : "channel_moderator" }
138138 response = await channel .add_members ([member ])
139139 assert len (response ["members" ]) == 1
@@ -145,13 +145,13 @@ async def test_assign_roles_moderators(self, event_loop, channel, random_user):
145145 assert response ["members" ][0 ]["channel_role" ] == "channel_member"
146146
147147 @pytest .mark .asyncio
148- async def test_mark_read (self , event_loop , channel , random_user ):
148+ async def test_mark_read (self , channel , random_user ):
149149 response = await channel .mark_read (random_user ["id" ])
150150 assert "event" in response
151151 assert response ["event" ]["type" ] == "message.read"
152152
153153 @pytest .mark .asyncio
154- async def test_get_replies (self , event_loop , channel , random_user ):
154+ async def test_get_replies (self , channel , random_user ):
155155 msg = await channel .send_message ({"text" : "hi" }, random_user ["id" ])
156156 response = await channel .get_replies (msg ["message" ]["id" ])
157157 assert "messages" in response
@@ -173,7 +173,7 @@ async def test_get_replies(self, event_loop, channel, random_user):
173173 assert response ["messages" ][0 ]["index" ] == 7
174174
175175 @pytest .mark .asyncio
176- async def test_get_reactions (self , event_loop , channel , random_user ):
176+ async def test_get_reactions (self , channel , random_user ):
177177 msg = await channel .send_message ({"text" : "hi" }, random_user ["id" ])
178178 response = await channel .get_reactions (msg ["message" ]["id" ])
179179
@@ -197,14 +197,14 @@ async def test_get_reactions(self, event_loop, channel, random_user):
197197 assert response ["reactions" ][0 ]["count" ] == 42
198198
199199 @pytest .mark .asyncio
200- async def test_send_and_delete_file (self , event_loop , channel , random_user ):
200+ async def test_send_and_delete_file (self , channel , random_user ):
201201 url = "helloworld.jpg"
202202 resp = await channel .send_file (url , "helloworld.jpg" , random_user )
203203 assert "helloworld.jpg" in resp ["file" ]
204204 await channel .delete_file (resp ["file" ])
205205
206206 @pytest .mark .asyncio
207- async def test_send_and_delete_image (self , event_loop , channel , random_user ):
207+ async def test_send_and_delete_image (self , channel , random_user ):
208208 url = "helloworld.jpg"
209209 resp = await channel .send_image (
210210 url , "helloworld.jpg" , random_user , content_type = "image/jpeg"
@@ -213,7 +213,7 @@ async def test_send_and_delete_image(self, event_loop, channel, random_user):
213213 await channel .delete_image (resp ["file" ])
214214
215215 @pytest .mark .asyncio
216- async def test_channel_hide_show (self , event_loop , client , channel , random_users ):
216+ async def test_channel_hide_show (self , client , channel , random_users ):
217217 # setup
218218 await channel .add_members ([u ["id" ] for u in random_users ])
219219 # verify
@@ -255,7 +255,7 @@ async def test_channel_hide_show(self, event_loop, client, channel, random_users
255255 assert len (response ["channels" ]) == 1
256256
257257 @pytest .mark .asyncio
258- async def test_invites (self , event_loop , client , channel ):
258+ async def test_invites (self , client , channel ):
259259 members = ["john" , "paul" , "george" , "pete" , "ringo" , "eric" ]
260260 await client .update_users ([{"id" : m } for m in members ])
261261 channel = client .channel (
@@ -285,7 +285,7 @@ async def test_invites(self, event_loop, client, channel):
285285 await channel .reject_invite ("eric" )
286286
287287 @pytest .mark .asyncio
288- async def test_query_members (self , event_loop , client , channel ):
288+ async def test_query_members (self , client , channel ):
289289 members = ["paul" , "george" , "john" , "jessica" , "john2" ]
290290 await client .update_users ([{"id" : m , "name" : m } for m in members ])
291291 for member in members :
@@ -303,7 +303,7 @@ async def test_query_members(self, event_loop, client, channel):
303303 assert response [1 ]["user" ]["id" ] == "john2"
304304
305305 @pytest .mark .asyncio
306- async def test_mute_unmute (self , event_loop , client , channel , random_users ):
306+ async def test_mute_unmute (self , client , channel , random_users ):
307307 user_id = random_users [0 ]["id" ]
308308 response = await channel .mute (user_id , expiration = 30000 )
309309 assert "channel_mute" in response
0 commit comments