Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 29, 2024
1 parent fd009e8 commit 0fb2bff
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions tests/test_firware_updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ def setUp(self):
pt_firmware_updater.FirmwareUpdater.fw_downloaded_successfully = Mock(
return_value=False
)
self.send_notification_mock = (
core.notification_manager.send_notification
) = Mock(return_value="1")
self.send_notification_mock = core.notification_manager.send_notification = (
Mock(return_value="1")
)

def tearDown(self):
for f in (self.path_to_fw_device, self.path_to_fw_to_upgrade):
Expand Down Expand Up @@ -203,9 +203,9 @@ def test_updates_if_user_accepts_notification(self):
wrapped_apply_update.assert_called_once()

def test_notifies_user_if_update_failed(self):
self.send_notification_mock = (
core.notification_manager.send_notification
) = Mock(return_value="0\nOK")
self.send_notification_mock = core.notification_manager.send_notification = (
Mock(return_value="0\nOK")
)
pt_firmware_updater.apply_update = Mock(return_value=[False, False])

parsed_args = dotdict(
Expand Down Expand Up @@ -236,9 +236,9 @@ def test_notifies_user_if_update_failed(self):
)

def test_notifies_user_if_update_succeeds(self):
self.send_notification_mock = (
core.notification_manager.send_notification
) = Mock(return_value="0\nOK")
self.send_notification_mock = core.notification_manager.send_notification = (
Mock(return_value="0\nOK")
)
pt_firmware_updater.apply_update = Mock(return_value=[True, False])

parsed_args = dotdict(
Expand All @@ -261,9 +261,9 @@ def test_notifies_user_if_update_succeeds(self):
)

def test_notifies_user_about_required_reboot(self):
self.send_notification_mock = (
core.notification_manager.send_notification
) = Mock(return_value="0\nOK")
self.send_notification_mock = core.notification_manager.send_notification = (
Mock(return_value="0\nOK")
)
pt_firmware_updater.apply_update = Mock(return_value=[True, True])

parsed_args = dotdict(
Expand Down

0 comments on commit 0fb2bff

Please sign in to comment.