Esempio n. 1
0
 def test_settings_command_rm(self, _, mock_remove_setting):
     rm_key = ['key']
     mock_args = mock.MagicMock(set_kwargs=None,
                                get_key=None,
                                rm_key=rm_key)
     cmds.settings_command(mock_args)
     mock_remove_setting.assert_called_with({}, rm_key[0])
 def test_settings_command_get(self, _, mock_get_setting):
     get_key = 'key'
     mock_args = mock.MagicMock(set_kwargs=None, get_key=get_key)
     cmds.settings_command(mock_args)
     mock_get_setting.assert_called_with({}, get_key)
 def test_settings_command_set(self, _, mock_set_settings):
     kwargs = [('key', 'value')]
     mock_args = mock.MagicMock(set_kwargs=kwargs)
     cmds.settings_command(mock_args)
     mock_set_settings.assert_called_with({}, kwargs)