aboutsummaryrefslogtreecommitdiff
path: root/tests/unit
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-12-09 10:39:41 -0600
committerFrederick Muriuki Muriithi2024-12-09 11:33:41 -0600
commit0e26bfd28f27603e7039b51cbdf596c58065c6c6 (patch)
tree28854599ca3afd0e3bb6f405828c4985424f7931 /tests/unit
parent709991993e3aa9e9f8fbdd8453660b7a43547486 (diff)
downloadgn-libs-0e26bfd28f27603e7039b51cbdf596c58065c6c6.tar.gz
Check for non-negative integers.
Diffstat (limited to 'tests/unit')
-rw-r--r--tests/unit/test_mysqldb.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/unit/test_mysqldb.py b/tests/unit/test_mysqldb.py
index b75f1e0..153f322 100644
--- a/tests/unit/test_mysqldb.py
+++ b/tests/unit/test_mysqldb.py
@@ -86,7 +86,9 @@ def test_parse_db_url_with_invalid_options(sql_uri, invalidopt):
@pytest.mark.parametrize(
"sql_uri",
(("mysql://auser:passwd@somehost:3307/thedb?use_unicode=fire"),
- ("mysql://auser:passwd@somehost:3307/thedb?use_unicode=3")))
+ ("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")))
def test_parse_db_url_with_invalid_options_values(sql_uri):
"""Test parsing with invalid options' values."""
with pytest.raises(InvalidOptionValue) as iov: