16
16
# it seems to fix the issue and also speed up the test from ~6s down to 1s.
17
17
# Thanks to (@gbdlin) for help with debugging.
18
18
19
-
20
19
@pytest .fixture (autouse = True )
21
20
def fix_async_db (request ):
22
21
"""
@@ -126,7 +125,6 @@ async def test_qlen_command_returns_zero_if_no_messages():
126
125
127
126
128
127
@pytest .mark .asyncio
129
- @pytest .mark .slow
130
128
@pytest .mark .django_db
131
129
async def test_qlen_command_returns_zero_if_all_messages_sent ():
132
130
# Mock context
@@ -141,7 +139,6 @@ async def test_qlen_command_returns_zero_if_all_messages_sent():
141
139
142
140
143
141
@pytest .mark .asyncio
144
- @pytest .mark .slow
145
142
@pytest .mark .django_db
146
143
async def test_qlen_command_correctly_counts_unsent_messags ():
147
144
# Mock context
@@ -161,11 +158,8 @@ async def test_qlen_command_correctly_counts_unsent_messags():
161
158
162
159
163
160
@pytest .mark .asyncio
164
- @pytest .mark .slow
165
161
@pytest .mark .django_db
166
162
async def test_polling_messages_sends_nothing_without_messages ():
167
- # NOTE: For some reason this test slows down the testsuite a bit
168
- # breakpoint()
169
163
mock_channel = AsyncMock ()
170
164
mock_channel .send = AsyncMock ()
171
165
@@ -176,10 +170,8 @@ async def test_polling_messages_sends_nothing_without_messages():
176
170
177
171
178
172
@pytest .mark .asyncio
179
- @pytest .mark .slow
180
173
@pytest .mark .django_db
181
174
async def test_polling_messages_sends_nothing_if_all_messages_are_sent ():
182
- # NOTE: For some reason this test slows down the testsuite a bit
183
175
mock_channel = AsyncMock ()
184
176
mock_channel .send = AsyncMock ()
185
177
await DiscordMessage .objects .acreate (sent_at = timezone .now ())
@@ -191,10 +183,8 @@ async def test_polling_messages_sends_nothing_if_all_messages_are_sent():
191
183
192
184
193
185
@pytest .mark .asyncio
194
- @pytest .mark .slow
195
186
@pytest .mark .django_db
196
187
async def test_polling_messages_sends_message_if_not_sent_and_sets_sent_at ():
197
- # NOTE: For some reason this test slows down the testsuite a bit
198
188
start = timezone .now ()
199
189
dm = await DiscordMessage .objects .acreate (
200
190
channel_id = "1234" ,
0 commit comments