From 5f5e33daaf909a5dbc5b0a1730c7510f19576548 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Mon, 9 Dec 2024 10:40:42 -0600 Subject: Parse for SSL_MODE option values from a list of acceptable values. --- tests/unit/test_mysqldb.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/unit/test_mysqldb.py b/tests/unit/test_mysqldb.py index 153f322..793dc1d 100644 --- a/tests/unit/test_mysqldb.py +++ b/tests/unit/test_mysqldb.py @@ -88,7 +88,10 @@ def test_parse_db_url_with_invalid_options(sql_uri, invalidopt): (("mysql://auser:passwd@somehost:3307/thedb?use_unicode=fire"), ("mysql://auser:passwd@somehost:3307/thedb?use_unicode=3"), ("mysql://auser:passwd@somehost:3307/thedb?connect_timeout=-30"), - ("mysql://auser:passwd@somehost:3307/thedb?connect_timeout=santa"))) + ("mysql://auser:passwd@somehost:3307/thedb?connect_timeout=santa"), + ("mysql://auser:passwd@somehost:3307/thedb?ssl_mode=yellow"), + ("mysql://auser:passwd@somehost:3307/thedb?ssl_mode=55"), + ("mysql://auser:passwd@somehost:3307/thedb?ssl_mode=true"))) def test_parse_db_url_with_invalid_options_values(sql_uri): """Test parsing with invalid options' values.""" with pytest.raises(InvalidOptionValue) as iov: -- cgit v1.2.3