Skip to content

Commit 7c6c019

Browse files
committed
filter coroutine warning where it's epexcted
1 parent bc067e6 commit 7c6c019

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/tests_async/test_cache_options.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
from django_valkey.async_cache.cache import AsyncValkeyCache
1515
from django_valkey.async_cache.client import AsyncHerdClient, AsyncDefaultClient
1616

17-
1817
pytestmark = pytest.mark.anyio
1918

2019
methods_with_no_parameters = {"clear", "close"}
@@ -77,6 +76,8 @@
7776
}
7877

7978

79+
# TODO: when django adjusts the signal, remove this decorator (and the ones below)
80+
@pytest.mark.filterwarnings("ignore:coroutine 'AsyncBackendCommands.close'")
8081
class TestDjangoValkeyOmitException:
8182
@pytest.fixture
8283
async def conf_cache(self, settings: SettingsWrapper):
@@ -231,6 +232,7 @@ async def with_prefix_cache() -> Iterable[AsyncValkeyCache]:
231232
await with_prefix.clear()
232233

233234

235+
@pytest.mark.filterwarnings("ignore:coroutine 'AsyncBackendCommands.close'")
234236
class TestDjangoValkeyCacheEscapePrefix:
235237
async def test_delete_pattern(
236238
self, key_prefix_cache: AsyncValkeyCache, with_prefix_cache: AsyncValkeyCache
@@ -261,6 +263,7 @@ async def test_keys(
261263
assert "b" not in keys
262264

263265

266+
@pytest.mark.filterwarnings("ignore:coroutine 'AsyncBackendCommands.close'")
264267
async def test_custom_key_function(cache: AsyncValkeyCache, settings: SettingsWrapper):
265268
caches_setting = copy.deepcopy(settings.CACHES)
266269
caches_setting["default"]["KEY_FUNCTION"] = "tests.test_cache_options.make_key"

0 commit comments

Comments
 (0)