Skip to content

Commit

Permalink
fix test_widgets.py
Browse files Browse the repository at this point in the history
  • Loading branch information
rocodes committed Feb 13, 2024
1 parent d574413 commit 044f902
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions client/tests/gui/test_widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -3589,8 +3589,6 @@ def test_FileWidget__on_export_clicked(mocker, session, source):
controller = mocker.MagicMock(get_file=get_file)
file_location = file.location(controller.data_dir)

export_device = mocker.patch("securedrop_client.export.Export")

fw = FileWidget(
file.uuid, controller, mocker.MagicMock(), mocker.MagicMock(), mocker.MagicMock(), 0, 123
)
Expand All @@ -3599,6 +3597,7 @@ def test_FileWidget__on_export_clicked(mocker, session, source):
controller.run_export_preflight_checks = mocker.MagicMock()
controller.downloaded_file_exists = mocker.MagicMock(return_value=True)

export_device = mocker.patch("securedrop_client.gui.widgets.Export")
wizard = mocker.patch("securedrop_client.gui.conversation.ExportWizard")

fw._on_export_clicked()
Expand Down Expand Up @@ -3650,7 +3649,6 @@ def test_FileWidget__on_print_clicked(mocker, session, source):

get_file = mocker.MagicMock(return_value=file)
controller = mocker.MagicMock(get_file=get_file)
export_device = mocker.patch("securedrop_client.export.Export")
file_location = file.location(controller.data_dir)

fw = FileWidget(
Expand All @@ -3667,6 +3665,7 @@ def test_FileWidget__on_print_clicked(mocker, session, source):
controller.print_file = mocker.MagicMock()
controller.downloaded_file_exists = mocker.MagicMock(return_value=True)

export_device = mocker.patch("securedrop_client.gui.widgets.Export")
dialog = mocker.patch("securedrop_client.gui.conversation.PrintDialog")

fw._on_print_clicked()
Expand Down

0 comments on commit 044f902

Please sign in to comment.