From 9e8edc1e5511f128dec6bcd70a10ebd263b76280 Mon Sep 17 00:00:00 2001 From: Hasan Ramezani Date: Thu, 11 Jun 2020 20:12:35 +0200 Subject: Fixed #31491 -- Allowed 'password' option in DATABASES['OPTIONS'] on MySQL. --- tests/dbshell/test_mysql.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'tests') 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', -- cgit v1.3