Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Fix deprecation warrning in test (#17963)

Filip Owczarek6c12181b9f79
diff --git a/saleor/graphql/account/tests/mutations/authentication/test_request_password_reset.py b/saleor/graphql/account/tests/mutations/authentication/test_request_password_reset.py
index 56d2a648a7..32214395da 100644
--- a/saleor/graphql/account/tests/mutations/authentication/test_request_password_reset.py
+++ b/saleor/graphql/account/tests/mutations/authentication/test_request_password_reset.py
@@ -1,4 +1,5 @@
import datetime
+import warnings
from unittest.mock import patch
from urllib.parse import urlencode
@@ -556,7 +557,10 @@ def test_account_reset_password_no_channel_provided_one_channel(
}
# when
- response = api_client.post_graphql(REQUEST_PASSWORD_RESET_MUTATION, variables)
+ # Catch deprecation warning for missing channel slug
+ # This is to ensure that the warning is not raised in the test output.
+ with warnings.catch_warnings(record=True):
+ response = api_client.post_graphql(REQUEST_PASSWORD_RESET_MUTATION, variables)
content = get_graphql_content(response)
# then