Block overwriting when creating sample project

This commit is contained in:
Veronica Berglyd Olsen
2024-02-20 23:20:49 +01:00
parent 576c13d045
commit 10764a2041
2 changed files with 11 additions and 1 deletions
+4 -1
View File
@@ -651,7 +651,7 @@ def testCoreTools_ProjectBuilderSample(monkeypatch, mockGUI, fncPath, tstPaths):
data = {
"name": "Test Sample",
"author": "Jane Doe",
"path": fncPath,
"path": fncPath / "project",
"sample": True,
}
@@ -684,6 +684,9 @@ def testCoreTools_ProjectBuilderSample(monkeypatch, mockGUI, fncPath, tstPaths):
zipObj.write(docFile, f"content/{docFile.name}")
assert builder.buildProject(data) is True
# Can't create to the same target again
assert builder.buildProject(data) is False
dstSample.unlink()
# END Test testCoreTools_ProjectBuilderSample