diff --git a/py/test/unit/selenium/webdriver/remote/remote_connection_tests.py b/py/test/unit/selenium/webdriver/remote/remote_connection_tests.py index 2a50b2ebe2683..2d86959f5bcaa 100644 --- a/py/test/unit/selenium/webdriver/remote/remote_connection_tests.py +++ b/py/test/unit/selenium/webdriver/remote/remote_connection_tests.py @@ -69,8 +69,13 @@ def test_get_remote_connection_headers_defaults(): def test_get_remote_connection_headers_adds_auth_header_if_pass(): url = "http://user:pass@remote" - headers = RemoteConnection.get_remote_connection_headers(parse.urlparse(url)) + with pytest.warns(None) as record: + headers = RemoteConnection.get_remote_connection_headers(parse.urlparse(url)) assert headers.get("Authorization") == "Basic dXNlcjpwYXNz" + assert ( + record[0].message.args[0] + == "Embedding username and password in URL could be insecure, use ClientConfig instead" + ) def test_get_remote_connection_headers_adds_keep_alive_if_requested():