Move the remaining project meta settings to project data class
This commit is contained in:
@@ -55,7 +55,7 @@ def testDlgProjDetails_Dialog(qtbot, nwGUI, nwLipsum):
|
||||
assert projDet.tabMain.wordCountVal.text() == f"{3000:n}"
|
||||
assert projDet.tabMain.chapCountVal.text() == f"{3:n}"
|
||||
assert projDet.tabMain.sceneCountVal.text() == f"{5:n}"
|
||||
assert projDet.tabMain.revCountVal.text() == f"{nwGUI.theProject.saveCount:n}"
|
||||
assert projDet.tabMain.revCountVal.text() == f"{nwGUI.theProject.data.saveCount:n}"
|
||||
|
||||
assert projDet.tabMain.projPathVal.text() == nwLipsum
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ def testDlgProjSettings_Main(qtbot, monkeypatch, nwGUI, fncDir, fncProj, mockRnd
|
||||
# Set some values
|
||||
theProject = nwGUI.theProject
|
||||
theProject.setSpellLang("en")
|
||||
theProject.setBookAuthors("Jane Smith\nJohn Smith")
|
||||
theProject.data.setAuthors("Jane Smith\nJohn Smith")
|
||||
theProject.setAutoReplace({"A": "B", "C": "D"})
|
||||
|
||||
# Create Dialog
|
||||
@@ -137,8 +137,8 @@ def testDlgProjSettings_Main(qtbot, monkeypatch, nwGUI, fncDir, fncProj, mockRnd
|
||||
|
||||
projSettings._doSave()
|
||||
assert theProject.data.name == "Project Name"
|
||||
assert theProject.bookTitle == "Project Title"
|
||||
assert theProject.bookAuthors == ["Jane Doe", "John Doh"]
|
||||
assert theProject.data.title == "Project Title"
|
||||
assert theProject.data.authors == ["Jane Doe", "John Doh"]
|
||||
|
||||
# Clean up
|
||||
projSettings._doClose()
|
||||
|
||||
Reference in New Issue
Block a user