Test new content.json content
This commit is contained in:
parent
2473a09f7b
commit
f46f9fa6ea
1 changed files with 12 additions and 1 deletions
|
@ -247,4 +247,15 @@ class TestUserContent:
|
||||||
assert not site.content_manager.verifyFile(
|
assert not site.content_manager.verifyFile(
|
||||||
"data/users/1J6UrZMkarjVg5ax9W4qThir3BFUikbW6C/content.json",
|
"data/users/1J6UrZMkarjVg5ax9W4qThir3BFUikbW6C/content.json",
|
||||||
StringIO(json.dumps(user_content)), ignore_same=False
|
StringIO(json.dumps(user_content)), ignore_same=False
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def testNewFile(self, site):
|
||||||
|
privatekey = "5KUh3PvNm5HUWoCfSUfcYvfQ2g3PrRNJWr6Q9eqdBGu23mtMntv" # For 1TeSTvb4w2PWE81S2rEELgmX2GCCExQGT
|
||||||
|
inner_path = "data/users/1NEWrZMkarjVg5ax9W4qThir3BFUikbW6C/content.json"
|
||||||
|
|
||||||
|
site.storage.writeJson(inner_path, {"test": "data"})
|
||||||
|
site.content_manager.sign(inner_path, privatekey)
|
||||||
|
assert "test" in site.storage.loadJson(inner_path)
|
||||||
|
|
||||||
|
site.storage.delete(inner_path)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue