Skip to content

Commit

Permalink
tests: Fix broken test by ignoring Python 3.12 warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
sondrelg committed Jan 5, 2024
1 parent d833650 commit b129beb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/test_extension_celery.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import logging
import warnings
from uuid import UUID, uuid4

import pytest
Expand Down Expand Up @@ -48,7 +49,10 @@ async def test_view():
caplog.set_level('DEBUG')

cid = uuid4().hex
await client.get('celery-test', headers={'X-Request-ID': cid})

with warnings.catch_warnings():
warnings.simplefilter('ignore')
await client.get('celery-test', headers={'X-Request-ID': cid})

# Check the view record
assert caplog.records[0].correlation_id == cid
Expand Down

0 comments on commit b129beb

Please sign in to comment.