Remove missing optional files from content.json on cloning

This commit is contained in:
shortcutme 2018-11-07 22:48:35 +01:00
parent eae6a34bfc
commit cf7d194dbf
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
2 changed files with 6 additions and 2 deletions

View file

@ -29,6 +29,10 @@ class TestSite:
assert new_site.storage.verifyFiles()["bad_files"] == [] # No bad files allowed
assert new_site.storage.query("SELECT * FROM keyvalue WHERE key = 'title'").fetchone()["value"] == "MyZeroBlog"
# Optional files should be removed
assert len(new_site.storage.loadJson("content.json").get("files_optional", {})) == 0
# Test re-cloning (updating)
# Changes in non-data files should be overwritten