about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/test_mysqldb.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/unit/test_mysqldb.py b/tests/unit/test_mysqldb.py
index 793dc1d..df8fd49 100644
--- a/tests/unit/test_mysqldb.py
+++ b/tests/unit/test_mysqldb.py
@@ -62,6 +62,22 @@ def test_database_connection(mock_db_parser, mock_sql):
           "user": None,
           "password": None,
           "database": "users"
+      }),
+     (("mysql://localhost/users?ssl=key;keyname,cert;/path/to/cert,ca;caname,"
+       "capath;/path/to/certificate/authority/files,cipher;ciphername"),
+      {
+          "host": "localhost",
+          "port": 3306,
+          "user": None,
+          "password": None,
+          "database": "users",
+          "ssl": {
+              "key": "keyname",
+              "cert": "/path/to/cert",
+              "ca": "caname",
+              "capath": "/path/to/certificate/authority/files",
+              "cipher": "ciphername"
+          }
       })))
 def test_parse_db_url(sql_uri, expected):
     """Test that valid URIs are passed into valid connection dicts"""