1616# it seems to fix the issue and also speed up the test from ~6s down to 1s.
1717# Thanks to (@gbdlin) for help with debugging.
1818
19-
2019@pytest .fixture (autouse = True )
2120def fix_async_db (request ):
2221 """
@@ -126,7 +125,6 @@ async def test_qlen_command_returns_zero_if_no_messages():
126125
127126
128127@pytest .mark .asyncio
129- @pytest .mark .slow
130128@pytest .mark .django_db
131129async def test_qlen_command_returns_zero_if_all_messages_sent ():
132130 # Mock context
@@ -141,7 +139,6 @@ async def test_qlen_command_returns_zero_if_all_messages_sent():
141139
142140
143141@pytest .mark .asyncio
144- @pytest .mark .slow
145142@pytest .mark .django_db
146143async def test_qlen_command_correctly_counts_unsent_messags ():
147144 # Mock context
@@ -161,11 +158,8 @@ async def test_qlen_command_correctly_counts_unsent_messags():
161158
162159
163160@pytest .mark .asyncio
164- @pytest .mark .slow
165161@pytest .mark .django_db
166162async def test_polling_messages_sends_nothing_without_messages ():
167- # NOTE: For some reason this test slows down the testsuite a bit
168- # breakpoint()
169163 mock_channel = AsyncMock ()
170164 mock_channel .send = AsyncMock ()
171165
@@ -176,10 +170,8 @@ async def test_polling_messages_sends_nothing_without_messages():
176170
177171
178172@pytest .mark .asyncio
179- @pytest .mark .slow
180173@pytest .mark .django_db
181174async def test_polling_messages_sends_nothing_if_all_messages_are_sent ():
182- # NOTE: For some reason this test slows down the testsuite a bit
183175 mock_channel = AsyncMock ()
184176 mock_channel .send = AsyncMock ()
185177 await DiscordMessage .objects .acreate (sent_at = timezone .now ())
@@ -191,10 +183,8 @@ async def test_polling_messages_sends_nothing_if_all_messages_are_sent():
191183
192184
193185@pytest .mark .asyncio
194- @pytest .mark .slow
195186@pytest .mark .django_db
196187async 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
198188 start = timezone .now ()
199189 dm = await DiscordMessage .objects .acreate (
200190 channel_id = "1234" ,
0 commit comments