Skip to content

Commit

Permalink
Update mocking in some more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
legoktm committed Dec 6, 2023
1 parent cd69841 commit 5dc47a4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
@pytest.fixture(scope="function")
def main_window(mocker, homedir, mock_export_service):
mocker.patch(
"securedrop_client.gui.conversation.export.device.export.getService",
"securedrop_client.export.getService",
return_value=mock_export_service,
)
# Setup
Expand Down Expand Up @@ -70,7 +70,7 @@ def main_window(mocker, homedir, mock_export_service):
@pytest.fixture(scope="function")
def main_window_no_key(mocker, homedir, mock_export_service):
mocker.patch(
"securedrop_client.gui.conversation.export.device.export.getService",
"securedrop_client.export.getService",
return_value=mock_export_service,
)
# Setup
Expand Down Expand Up @@ -169,7 +169,7 @@ def mock_export_service():
@pytest.fixture(scope="function")
def print_dialog(mocker, homedir, mock_export_service):
mocker.patch(
"securedrop_client.gui.conversation.export.device.export.getService",
"securedrop_client.export.getService",
return_value=mock_export_service,
)
app = QApplication([])
Expand All @@ -193,7 +193,7 @@ def print_dialog(mocker, homedir, mock_export_service):
)
controller.authenticated_user = factory.User()
controller.qubes = False
export_device = conversation.ExportDevice(controller)
export_device = conversation.ExportDevice(controller, mock_export_service)
gui.setup(controller)
gui.login_dialog.close()
dialog = conversation.PrintFileDialog(export_device, "file_uuid", "file_name")
Expand All @@ -208,7 +208,7 @@ def print_dialog(mocker, homedir, mock_export_service):
@pytest.fixture(scope="function")
def export_file_dialog(mocker, homedir, mock_export_service):
mocker.patch(
"securedrop_client.gui.conversation.export.device.export.getService",
"securedrop_client.export.getService",
return_value=mock_export_service,
)
app = QApplication([])
Expand All @@ -229,7 +229,7 @@ def export_file_dialog(mocker, homedir, mock_export_service):
)
controller.authenticated_user = factory.User()
controller.qubes = False
export_device = conversation.ExportDevice(controller)
export_device = conversation.ExportDevice(controller, mock_export_service)
gui.setup(controller)
gui.login_dialog.close()
dialog = conversation.ExportFileDialog(export_device, "file_uuid", "file_name")
Expand Down

0 comments on commit 5dc47a4

Please sign in to comment.