MCPcopy
hub / github.com/HelloZeroNet/ZeroNet / testNewFile

Method testNewFile

src/Test/TestContentUser.py:382–390  ·  view source on GitHub ↗
(self, site)

Source from the content-addressed store, hash-verified

380
381
382 def testNewFile(self, site):
383 privatekey = "5KUh3PvNm5HUWoCfSUfcYvfQ2g3PrRNJWr6Q9eqdBGu23mtMntv" # For 1TeSTvb4w2PWE81S2rEELgmX2GCCExQGT
384 inner_path = "data/users/1NEWrZMkarjVg5ax9W4qThir3BFUikbW6C/content.json"
385
386 site.storage.writeJson(inner_path, {"test": "data"})
387 site.content_manager.sign(inner_path, privatekey)
388 assert "test" in site.storage.loadJson(inner_path)
389
390 site.storage.delete(inner_path)

Callers

nothing calls this directly

Calls 4

writeJsonMethod · 0.80
loadJsonMethod · 0.80
signMethod · 0.45
deleteMethod · 0.45

Tested by

no test coverage detected