Skip to content

Commit

Permalink
chore(linux): rename parameters
Browse files Browse the repository at this point in the history
This addresses code review comments.
  • Loading branch information
ermshiperete committed Oct 16, 2023
1 parent 303e57b commit c56b8a7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions linux/keyman-config/tests/test_ibus_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,39 +54,39 @@ def test_installToIbus_AlreadyInstalled(self, patched_settings_set, patched_sett

@patch('keyman_config.gsettings.GSettings.get', return_value=['k1', 'k2', 'k3'])
@patch('keyman_config.gsettings.GSettings.set')
def test_installToIbus_InstallsNewKb(self, mock_settings_set, mock_settings_get, patched_time_sleep, MockIbusBusClass):
def test_installToIbus_InstallsNewKb(self, patched_settings_set, patched_settings_get, patched_time_sleep, MockIbusBusClass):
# Setup
mock_ibusBusInstance = MockIbusBusClass.return_value
# Execute
install_to_ibus(mock_ibusBusInstance, 'k4')
# Verify
mock_settings_set.assert_called_once_with(
patched_settings_set.assert_called_once_with(
"preload-engines", ['k1', 'k2', 'k3', 'k4'], 'as')
mock_ibusBusInstance.preload_engines.assert_called_once_with(
['k1', 'k2', 'k3', 'k4'])

@patch('keyman_config.gsettings.GSettings.get', return_value=['k1', 'k2', 'k3'])
@patch('keyman_config.gsettings.GSettings.set')
def test_uninstallFromIbus_KbInstalled(self, mock_settings_set, mock_settings_get, patched_time_sleep, MockIbusBusClass):
def test_uninstallFromIbus_KbInstalled(self, patched_settings_set, patched_settings_get, patched_time_sleep, MockIbusBusClass):
# Setup
mock_ibusBusInstance = MockIbusBusClass.return_value
# Execute
uninstall_from_ibus(mock_ibusBusInstance, 'k2')
# Verify
mock_settings_set.assert_called_once_with(
patched_settings_set.assert_called_once_with(
"preload-engines", ['k1', 'k3'], 'as')
mock_ibusBusInstance.preload_engines.assert_called_once_with(
['k1', 'k3'])

@patch('keyman_config.gsettings.GSettings.get', return_value=['k1', 'k2', 'k3'])
@patch('keyman_config.gsettings.GSettings.set')
def test_uninstallFromIbus_KbNotInstalled(self, mock_settings_set, mock_settings_get, patched_time_sleep, MockIbusBusClass):
def test_uninstallFromIbus_KbNotInstalled(self, patched_settings_set, patched_settings_get, patched_time_sleep, MockIbusBusClass):
# Setup
mock_ibusBusInstance = MockIbusBusClass.return_value
# Execute
uninstall_from_ibus(mock_ibusBusInstance, 'k4')
# Verify
mock_settings_set.assert_called_once_with(
patched_settings_set.assert_called_once_with(
"preload-engines", ['k1', 'k2', 'k3'], 'as')
mock_ibusBusInstance.preload_engines.assert_called_once_with(
['k1', 'k2', 'k3'])
Expand Down

0 comments on commit c56b8a7

Please sign in to comment.