summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2022-03-08 13:17:05 +0100
committerGitHub <noreply@github.com>2022-03-08 13:17:05 +0100
commitd4fd31684ad5a7b9be8a9d26c5a8796f96c8d80b (patch)
tree7391c1dfc45b8bc0b7f2a6ac752cce63ed7806f8 /tests
parentd9fc383a5e0ad0a570fb2aa0387cabc648053c09 (diff)
Refs #33173 -- Used locale.getlocale() instead of getdefaultlocale().
locale.getdefaultlocale() was deprecated in Python 3.11, see https://bugs.python.org/issue46659.
Diffstat (limited to 'tests')
-rw-r--r--tests/utils_tests/test_encoding.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/utils_tests/test_encoding.py b/tests/utils_tests/test_encoding.py
index 8dddd4e250..6dea260b84 100644
--- a/tests/utils_tests/test_encoding.py
+++ b/tests/utils_tests/test_encoding.py
@@ -106,7 +106,7 @@ class TestEncodingUtils(SimpleTestCase):
self.assertEqual(smart_str("foo"), "foo")
def test_get_default_encoding(self):
- with mock.patch("locale.getdefaultlocale", side_effect=Exception):
+ with mock.patch("locale.getlocale", side_effect=Exception):
self.assertEqual(get_system_encoding(), "ascii")
def test_repercent_broken_unicode_recursion_error(self):