From af87574a3c3df61cf2f829909977e347118e6480 Mon Sep 17 00:00:00 2001 From: manav014 Date: Wed, 14 Oct 2020 23:37:57 +0530 Subject: Fixed #6517 -- Made dbshell use charset option on MySQL. Co-Authored-By: Mariusz Felisiak --- tests/dbshell/test_mysql.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'tests/dbshell') diff --git a/tests/dbshell/test_mysql.py b/tests/dbshell/test_mysql.py index 95faa21647..e09644962b 100644 --- a/tests/dbshell/test_mysql.py +++ b/tests/dbshell/test_mysql.py @@ -59,6 +59,23 @@ class MySqlDbshellCommandTestCase(SimpleTestCase): }), ) + def test_options_charset(self): + self.assertEqual( + [ + 'mysql', '--user=someuser', '--password=somepassword', + '--host=somehost', '--port=444', + '--default-character-set=utf8', 'somedbname', + ], + self.get_command_line_arguments({ + 'NAME': 'somedbname', + 'USER': 'someuser', + 'PASSWORD': 'somepassword', + 'HOST': 'somehost', + 'PORT': 444, + 'OPTIONS': {'charset': 'utf8'}, + }), + ) + def test_can_connect_using_sockets(self): self.assertEqual( ['mysql', '--user=someuser', '--password=somepassword', -- cgit v1.3