Skip to content

Commit

Permalink
fixup! fixup! Refactor extract non-GUI modules
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzalo-bulnes committed Dec 3, 2022
1 parent a17ecf9 commit d61aa3f
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion securedrop_client/export/printer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from PyQt5.QtCore import QObject, QState, QStateMachine, QTimer, pyqtSignal, pyqtSlot

from .service import Service, ExportError
from .service import ExportError, Service

DEFAULT_POLLING_INTERVAL_IN_MILLISECONDS = 2000

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

from PyQt5.QtCore import QSize, pyqtSlot

from securedrop_client.gui.base import ModalDialog, SecureQLabel

from securedrop_client.export import Printer
from securedrop_client.gui.base import ModalDialog, SecureQLabel


class ConfirmationDialog(ModalDialog):
Expand Down
2 changes: 1 addition & 1 deletion tests/export/test_printer.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from PyQt5.QtCore import QObject, pyqtSignal, pyqtSlot
from PyQt5.QtTest import QSignalSpy

from securedrop_client.export import getPrinter, Printer, Service
from securedrop_client.export import Printer, Service, getPrinter
from tests.helper import app # noqa: F401


Expand Down
5 changes: 2 additions & 3 deletions tests/gui/conversation/print/test_confirmation_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
from PyQt5.QtTest import QSignalSpy

from securedrop_client import export
from securedrop_client.export import Printer, getPrinter
from securedrop_client.gui import conversation
from securedrop_client.export import getPrinter, Printer
from securedrop_client.logic import Controller
from tests.helper import app # noqa: F401

expected_message = {
Expand Down Expand Up @@ -45,7 +44,7 @@ def setUp(self):
def test_assumes_printer_status_is_unknown_by_default(self):
self.assertDialogReflectsPrinterStatus(self.dialog, Printer.StatusUnknown)

@unittest.skip('WIP')
@unittest.skip("WIP")
def test_tracks_printer_status(self):
for status in [Printer.StatusReady, Printer.StatusUnreachable, Printer.StatusUnknown]:
self._printer.status = status
Expand Down
6 changes: 3 additions & 3 deletions tests/gui/test_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

from securedrop_client import state
from securedrop_client.db import Source
from securedrop_client.gui import actions
from securedrop_client.export import Printer
from securedrop_client.gui import actions
from securedrop_client.logic import Controller
from tests import factory
from tests.helper import app # noqa: F401
Expand Down Expand Up @@ -103,7 +103,7 @@ def _print_conversation_template(path: Path) -> None:
self._app_state,
)

@unittest.skip('WIP')
@unittest.skip("WIP")
def test_prints_conversation_when_dialog_accepted(self):
self._controller.data_dir = "/tmp"
# Accept the confimation dialog from a separate thread.
Expand Down Expand Up @@ -135,7 +135,7 @@ def test_requires_authenticated_journalist(self):
assert not self._print_conversation.called
controller.on_action_requiring_login.assert_called_once()

@unittest.skip('WIP')
@unittest.skip("WIP")
def test_prints_nothing_if_no_conversation_is_selected(self):
self._app_state.selected_conversation = None

Expand Down
1 change: 0 additions & 1 deletion tests/gui/test_widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

from securedrop_client import db, logic, storage
from securedrop_client.app import threads
from securedrop_client.export import Printer
from securedrop_client.gui.source import DeleteSourceDialog
from securedrop_client.gui.widgets import (
ActivityStatusBar,
Expand Down

0 comments on commit d61aa3f

Please sign in to comment.