Fix tests
This commit is contained in:
@@ -28,8 +28,9 @@ from tools import cmpFiles
|
|||||||
|
|
||||||
from PyQt5.QtCore import Qt
|
from PyQt5.QtCore import Qt
|
||||||
from PyQt5.QtGui import QTextCursor
|
from PyQt5.QtGui import QTextCursor
|
||||||
from PyQt5.QtWidgets import QAction, QMessageBox
|
from PyQt5.QtWidgets import QAction, QMessageBox, QDialog
|
||||||
|
|
||||||
|
from nw.gui.itemeditor import GuiItemEditor
|
||||||
from nw.gui.doceditor import GuiDocEditor
|
from nw.gui.doceditor import GuiDocEditor
|
||||||
from nw.gui.projtree import GuiProjectTree
|
from nw.gui.projtree import GuiProjectTree
|
||||||
from nw.constants import nwItemType, nwDocAction
|
from nw.constants import nwItemType, nwDocAction
|
||||||
@@ -44,6 +45,9 @@ def testGuiEditor_Main(qtbot, monkeypatch, nwGUI, fncDir, fncProj, refDir, outDi
|
|||||||
"""
|
"""
|
||||||
# Block message box
|
# Block message box
|
||||||
monkeypatch.setattr(QMessageBox, "question", lambda *args: QMessageBox.Yes)
|
monkeypatch.setattr(QMessageBox, "question", lambda *args: QMessageBox.Yes)
|
||||||
|
monkeypatch.setattr(QMessageBox, "information", lambda *args: QMessageBox.Yes)
|
||||||
|
monkeypatch.setattr(GuiItemEditor, "exec_", lambda *args: None)
|
||||||
|
monkeypatch.setattr(GuiItemEditor, "result", lambda *args: QDialog.Accepted)
|
||||||
monkeypatch.setattr(GuiProjectTree, "hasFocus", lambda *args: True)
|
monkeypatch.setattr(GuiProjectTree, "hasFocus", lambda *args: True)
|
||||||
monkeypatch.setattr(GuiDocEditor, "hasFocus", lambda *args: True)
|
monkeypatch.setattr(GuiDocEditor, "hasFocus", lambda *args: True)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user