Created
October 10, 2021 15:44
-
-
Save RyanKor/ea50c18629bdb9e1f1fbc178e7d1f580 to your computer and use it in GitHub Desktop.
테스트 케이스 수정본
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mock.patch("keystoneauth1.loading.base.get_plugin_options", | |
return_value=opts) | |
def test_show_mask_with_cloud_config(self, m_get_plugin_opts): | |
arglist = ['--mask'] | |
verifylist = [('mask', True)] | |
self.app.client_manager.configuration_type = "cloud_config" | |
cmd = configuration.ShowConfiguration(self.app, None) | |
parsed_args = self.check_parser(cmd, arglist, verifylist) | |
columns, data = cmd.take_action(parsed_args) | |
self.assertEqual(self.columns, columns) | |
self.assertEqual(self.datalist, data) | |
@mock.patch("keystoneauth1.loading.base.get_plugin_options", | |
return_value=opts) | |
def test_show_mask_with_global_env(self, m_get_plugin_opts): | |
arglist = ['--mask'] | |
verifylist = [('mask', True)] | |
self.app.client_manager.configuration_type = "global_env" | |
column_list = ( | |
'identity_api_version', | |
'password', | |
'region', | |
'token', | |
'username' | |
) | |
datalist = ( | |
fakes.VERSION, | |
configuration.REDACTED, | |
fakes.REGION_NAME, | |
configuration.REDACTED, | |
fakes.USERNAME, | |
) | |
cmd = configuration.ShowConfiguration(self.app, None) | |
parsed_args = self.check_parser(cmd, arglist, verifylist) | |
columns, data = cmd.take_action(parsed_args) | |
self.assertEqual(column_list, columns) | |
self.assertEqual(datalist, data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment