Replace exec_ with exec

This commit is contained in:
Veronica Berglyd Olsen
2024-04-03 18:41:39 +02:00
parent c8fe5e6620
commit f95bbb8760
28 changed files with 49 additions and 49 deletions
+2 -2
View File
@@ -47,8 +47,8 @@ LANG_DATA = CONFIG.listLanguages(CONFIG.LANG_NW)
@pytest.mark.parametrize("language", [a for a, b in LANG_DATA])
def testGuiI18n_Localisation(qtbot, monkeypatch, language, nwGUI, projPath):
"""Test loading the gui with a specific language."""
monkeypatch.setattr(QDialog, "exec_", lambda *a: None)
monkeypatch.setattr(QMessageBox, "exec_", lambda *a: None)
monkeypatch.setattr(QDialog, "exec", lambda *a: None)
monkeypatch.setattr(QMessageBox, "exec", lambda *a: None)
monkeypatch.setattr(QMessageBox, "result", lambda *a: QMessageBox.Yes)
# Set the test language