From 9a1434e6ff766f615661bf8ddf0b6fda2130f1fa Mon Sep 17 00:00:00 2001 From: yucheng Date: Thu, 24 Sep 2026 11:14:34 +0000 Subject: [PATCH] test(proxy): use raw strings for regex match patterns Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .../proxy/common_utils/test_encrypt_decrypt_utils.py | 2 +- tests/test_litellm/proxy/proxy_server/test_proxy_config.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_litellm/proxy/common_utils/test_encrypt_decrypt_utils.py b/tests/test_litellm/proxy/common_utils/test_encrypt_decrypt_utils.py index 6c0118576ea..cf9ad5b1c1e 100644 --- a/tests/test_litellm/proxy/common_utils/test_encrypt_decrypt_utils.py +++ b/tests/test_litellm/proxy/common_utils/test_encrypt_decrypt_utils.py @@ -203,7 +203,7 @@ def test_require_legacy_reader_refuses_rewrite_passes_without_pynacl(monkeypatch monkeypatch.setitem(sys.modules, "nacl", None) monkeypatch.setitem(sys.modules, "nacl.secret", None) - with pytest.raises(LegacyEncryptionUnavailableError, match="rotate the master key.*legacy-encryption"): + with pytest.raises(LegacyEncryptionUnavailableError, match=r"rotate the master key.*legacy-encryption"): require_legacy_reader("rotate the master key") diff --git a/tests/test_litellm/proxy/proxy_server/test_proxy_config.py b/tests/test_litellm/proxy/proxy_server/test_proxy_config.py index cf3676076e8..b50dbc17e21 100644 --- a/tests/test_litellm/proxy/proxy_server/test_proxy_config.py +++ b/tests/test_litellm/proxy/proxy_server/test_proxy_config.py @@ -3509,7 +3509,7 @@ def test_ProxyConfig__encrypt_env_variables_for_db_refuses_without_pynacl_instea monkeypatch.setitem(sys.modules, "nacl", None) monkeypatch.setitem(sys.modules, "nacl.secret", None) pc = ProxyConfig() - with pytest.raises(LegacyEncryptionUnavailableError, match="config save.*legacy-encryption"): + with pytest.raises(LegacyEncryptionUnavailableError, match=r"config save.*legacy-encryption"): pc._encrypt_env_variables_for_db({"A": "1"})