diff --git a/securedrop_client/export/service.py b/securedrop_client/export/service.py index b1253c573..8ae47e8cb 100644 --- a/securedrop_client/export/service.py +++ b/securedrop_client/export/service.py @@ -42,6 +42,7 @@ class Service(QObject): printer_not_found_ready = pyqtSignal(object) print_failed = pyqtSignal(object) print_succeeded = pyqtSignal() + print_finished = pyqtSignal(list) def __init__( self, @@ -72,6 +73,7 @@ def __init__( self.export_succeeded.connect(self.export_usb_call_success) self.export_failed.connect(self.export_usb_call_failure) self.export_finished.connect(self.export_completed) + self.print_finished.connect(self.export_completed) def connect_signals( self, @@ -171,7 +173,7 @@ def print(self, filepaths: List[str]) -> None: logger.debug(f"Export failed: {e}") self.print_failed.emit(e) - self.export_completed.emit(filepaths) + self.print_finished.emit(filepaths) # Store the service instance to prevent unnecessary concurrent access to the CLI. See getService. diff --git a/tests/export/test_service.py b/tests/export/test_service.py index b7cc8bea6..fc864551c 100644 --- a/tests/export/test_service.py +++ b/tests/export/test_service.py @@ -52,4 +52,6 @@ def test_emits_printer_not_found_ready_when_printer_status_check_fails( assert len(printer_not_found_ready_emissions) == 1 assert printer_not_found_ready_emissions[0] == [expected_error] + # FIXME Add printer's printing API tests + # FIXME Add disk API tests