Added more info to the forst tab of the Project Details dialog
This commit is contained in:
@@ -682,10 +682,31 @@ def testCoreProject_Methods(monkeypatch, nwMinimal, dummyGUI, tmpDir):
|
||||
assert theProject.bookTitle == "A Title"
|
||||
|
||||
# Project Authors
|
||||
# Check that the list is cleaned up and that it can be extracted as
|
||||
# a properly formatted string, depending on number of names
|
||||
assert not theProject.setBookAuthors([])
|
||||
assert theProject.setBookAuthors(" Jane Doe \n John Doh \n ")
|
||||
assert theProject.bookAuthors == ["Jane Doe", "John Doh"]
|
||||
|
||||
assert theProject.setBookAuthors("")
|
||||
assert theProject.getAuthors() == ""
|
||||
|
||||
assert theProject.setBookAuthors("Jane Doe")
|
||||
assert theProject.getAuthors() == "Jane Doe"
|
||||
|
||||
assert theProject.setBookAuthors("Jane Doe\nJohn Doh")
|
||||
assert theProject.getAuthors() == "Jane Doe and John Doh"
|
||||
|
||||
assert theProject.setBookAuthors("Jane Doe\nJohn Doh\nBod Owens")
|
||||
assert theProject.getAuthors() == "Jane Doe, John Doh and Bod Owens"
|
||||
|
||||
# Edit Time
|
||||
theProject.editTime = 1234
|
||||
theProject.projOpened = 1600000000
|
||||
monkeypatch.setattr("nw.core.project.time", lambda: 1600005600)
|
||||
assert theProject.getCurrentEditTime() == 6834
|
||||
monkeypatch.undo()
|
||||
|
||||
# Trash folder
|
||||
# Should create on first call, and just returned on later calls
|
||||
assert theProject.projTree["73475cb40a568"] is None
|
||||
|
||||
Reference in New Issue
Block a user