diff options
author | Hasan Ramezani <hasan.r67@gmail.com> | 2020-06-11 20:12:35 +0200 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-06-12 12:07:43 +0200 |
commit | 9e8edc1e5511f128dec6bcd70a10ebd263b76280 (patch) | |
tree | 7e8b5d42b733f1372330a49292aefeca43012282 /tests/dbshell | |
parent | 2928019e0ccd8e9c7d3a3fba7722a7af87018e5d (diff) | |
download | django-9e8edc1e5511f128dec6bcd70a10ebd263b76280.tar.gz |
Fixed #31491 -- Allowed 'password' option in DATABASES['OPTIONS'] on MySQL.
Diffstat (limited to 'tests/dbshell')
-rw-r--r-- | tests/dbshell/test_mysql.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/dbshell/test_mysql.py b/tests/dbshell/test_mysql.py index 91c1a6cd50..95faa21647 100644 --- a/tests/dbshell/test_mysql.py +++ b/tests/dbshell/test_mysql.py @@ -43,6 +43,22 @@ class MySqlDbshellCommandTestCase(SimpleTestCase): }, })) + def test_options_password(self): + self.assertEqual( + [ + 'mysql', '--user=someuser', '--password=optionpassword', + '--host=somehost', '--port=444', 'somedbname', + ], + self.get_command_line_arguments({ + 'NAME': 'somedbname', + 'USER': 'someuser', + 'PASSWORD': 'settingpassword', + 'HOST': 'somehost', + 'PORT': 444, + 'OPTIONS': {'password': 'optionpassword'}, + }), + ) + def test_can_connect_using_sockets(self): self.assertEqual( ['mysql', '--user=someuser', '--password=somepassword', |