Fixed #31491 -- Allowed 'password' option in DATABASES['OPTIONS'] on MySQL.

This commit is contained in:
Hasan Ramezani 2020-06-11 20:12:35 +02:00 committed by Mariusz Felisiak
parent 2928019e0c
commit 9e8edc1e55
2 changed files with 22 additions and 3 deletions

View file

@ -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',