Skip to content

Commit

Permalink
Test new content.json content
Browse files Browse the repository at this point in the history
  • Loading branch information
shortcutme committed Mar 12, 2017
1 parent 2473a09 commit f46f9fa
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/Test/TestContentUser.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,4 +247,15 @@ def testMissingCert(self, site):
assert not site.content_manager.verifyFile(
"data/users/1J6UrZMkarjVg5ax9W4qThir3BFUikbW6C/content.json",
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)

0 comments on commit f46f9fa

Please sign in to comment.