Move qutae symbol dialog source file to the dialogs folder

This commit is contained in:
Veronica K. B. Olsen
2021-04-23 21:49:20 +02:00
parent 03a80beebe
commit b698ccbc1d
10 changed files with 690 additions and 654 deletions
@@ -25,20 +25,20 @@ import pytest
from PyQt5.QtCore import QItemSelectionModel
from PyQt5.QtWidgets import QListWidgetItem, QDialog, QMessageBox
from nw.gui.custom import QuotesDialog
from nw.dialogs import GuiQuoteSelect
keyDelay = 2
typeDelay = 1
stepDelay = 20
@pytest.mark.gui
def testGuiDialogs_Quotes(qtbot, monkeypatch, nwGUI, nwMinimal):
def testDialogs_QuoteSelect(qtbot, monkeypatch, nwGUI, nwMinimal):
"""Test the quote symbols dialog.
"""
# Block message box
monkeypatch.setattr(QMessageBox, "question", lambda *args: QMessageBox.Yes)
nwQuot = QuotesDialog(nwGUI)
nwQuot = GuiQuoteSelect(nwGUI)
nwQuot.show()
lastItem = ""
@@ -58,4 +58,4 @@ def testGuiDialogs_Quotes(qtbot, monkeypatch, nwGUI, nwMinimal):
nwQuot._doReject()
nwQuot.close()
# END Test testDialogs_Quotes
# END Test testDialogs_QuoteSelect
+3 -4
View File
@@ -33,8 +33,7 @@ from PyQt5.QtWidgets import (
)
from nw.config import Config
from nw.gui.custom import QuotesDialog
from nw.dialogs import GuiPreferences
from nw.dialogs import GuiPreferences, GuiQuoteSelect
from nw.constants import nwConst
keyDelay = 2
@@ -234,8 +233,8 @@ def testDlgPreferences_Main(qtbot, monkeypatch, fncDir, outDir, refDir):
tabQuote = nwPrefs.tabQuote
nwPrefs._tabBox.setCurrentWidget(tabQuote)
monkeypatch.setattr(QuotesDialog, "selectedQuote", "'")
monkeypatch.setattr(QuotesDialog, "exec_", lambda *args: QDialog.Accepted)
monkeypatch.setattr(GuiQuoteSelect, "selectedQuote", "'")
monkeypatch.setattr(GuiQuoteSelect, "exec_", lambda *args: QDialog.Accepted)
qtbot.mouseClick(tabQuote.btnDoubleStyleC, Qt.LeftButton)
# Save and Check Config