3 | | def test_charset_configured(self): |
4 | | self.assertEqual( |
5 | | ['mysql', '--user=someuser', '--password=somepassword', |
6 | | '--host=somehost', '--port=444', 'default-character-set=utf8', 'somedbname'], |
7 | | self.get_command_line_arguments({ |
8 | | 'NAME': 'somedbname', |
9 | | 'USER': 'someuser', |
10 | | 'PASSWORD': 'somepassword', |
11 | | 'HOST': 'somehost', |
12 | | 'PORT': 444, |
13 | | 'DEFAULT-CHARACTER-SET' : 'utf8', |
14 | | })) |
| 4 | def test_charset_configured(self): |
| 5 | self.assertEqual( |
| 6 | ['mysql', '--user=someuser', '--password=somepassword', |
| 7 | '--host=somehost', '--port=444', 'somedbname'], |
| 8 | self.get_command_line_arguments({ |
| 9 | 'NAME': 'somedbname', |
| 10 | 'USER': 'someuser', |
| 11 | 'PASSWORD': 'somepassword', |
| 12 | 'HOST': 'somehost', |
| 13 | 'PORT': 444, |
| 14 | 'DEFAULT-CHARACTER-SET': 'utf8', |
| 15 | 'OPTIONS': {}, |
| 16 | })) |
| 17 | }}} |
| 18 | So in the above-mentioned tests, it is working fine when I am not using --default-character-set=utf8 in the list while I am including the same in the dictionary. (The above test is working fine) but IMO it should not work fine as when we are explicitly defining default-character-set to utf8 in the settings file, then it is to be mentioned in the list but as soon as I am adding the same to the list it is raising an error which means it needs a patch and after applying the patch as follows: |
| 19 | {{{ |
17 | | Adding above mentioned function in {{{MySqlDbshellCommandTestCase}}} class of {{{tests/dbshell/test_mysql.py}}} would be a good test function? |
18 | | Please review the same so that I may create a PR. |
| 25 | The above test is getting failed and the below-mentioned test is getting successfully executed. |
| 26 | {{{ |
| 27 | def test_charset_configured(self): |
| 28 | self.assertEqual( |
| 29 | ['mysql', '--user=someuser', '--password=somepassword', |
| 30 | '--host=somehost', '--port=444', 'somedbname', '--default-character-set=utf8'], |
| 31 | self.get_command_line_arguments({ |
| 32 | 'NAME': 'somedbname', |
| 33 | 'USER': 'someuser', |
| 34 | 'PASSWORD': 'somepassword', |
| 35 | 'HOST': 'somehost', |
| 36 | 'PORT': 444, |
| 37 | 'OPTIONS': {}, |
| 38 | 'DEFAULT-CHARACTER-SET': 'utf8', |
| 39 | })) |
| 40 | }}} |
| 41 | If the patch and the tests seem fine, I may create a PR |