Fix broken tests caused by removing signs from memory
This commit is contained in:
parent
695d257be5
commit
9a15cd80b6
2 changed files with 2 additions and 3 deletions
|
@ -107,7 +107,6 @@ class TestContent:
|
||||||
site.content_manager.contents["content.json"]["optional"] = "((data/img/zero.*))"
|
site.content_manager.contents["content.json"]["optional"] = "((data/img/zero.*))"
|
||||||
content_optional = site.content_manager.sign(privatekey="5KUh3PvNm5HUWoCfSUfcYvfQ2g3PrRNJWr6Q9eqdBGu23mtMntv", filewrite=False)
|
content_optional = site.content_manager.sign(privatekey="5KUh3PvNm5HUWoCfSUfcYvfQ2g3PrRNJWr6Q9eqdBGu23mtMntv", filewrite=False)
|
||||||
|
|
||||||
|
|
||||||
del site.content_manager.contents["content.json"]["optional"]
|
del site.content_manager.contents["content.json"]["optional"]
|
||||||
content_nooptional = site.content_manager.sign(privatekey="5KUh3PvNm5HUWoCfSUfcYvfQ2g3PrRNJWr6Q9eqdBGu23mtMntv", filewrite=False)
|
content_nooptional = site.content_manager.sign(privatekey="5KUh3PvNm5HUWoCfSUfcYvfQ2g3PrRNJWr6Q9eqdBGu23mtMntv", filewrite=False)
|
||||||
|
|
||||||
|
@ -136,7 +135,7 @@ class TestContent:
|
||||||
def testVerify(self, site):
|
def testVerify(self, site):
|
||||||
privatekey = "5KUh3PvNm5HUWoCfSUfcYvfQ2g3PrRNJWr6Q9eqdBGu23mtMntv"
|
privatekey = "5KUh3PvNm5HUWoCfSUfcYvfQ2g3PrRNJWr6Q9eqdBGu23mtMntv"
|
||||||
inner_path = "data/test_include/content.json"
|
inner_path = "data/test_include/content.json"
|
||||||
data_dict = site.content_manager.contents[inner_path]
|
data_dict = site.storage.loadJson(inner_path)
|
||||||
data = StringIO(json.dumps(data_dict))
|
data = StringIO(json.dumps(data_dict))
|
||||||
|
|
||||||
# Re-sign
|
# Re-sign
|
||||||
|
|
|
@ -66,7 +66,7 @@ class TestUserContent:
|
||||||
def testVerify(self, site):
|
def testVerify(self, site):
|
||||||
privatekey = "5KUh3PvNm5HUWoCfSUfcYvfQ2g3PrRNJWr6Q9eqdBGu23mtMntv" # For 1TeSTvb4w2PWE81S2rEELgmX2GCCExQGT
|
privatekey = "5KUh3PvNm5HUWoCfSUfcYvfQ2g3PrRNJWr6Q9eqdBGu23mtMntv" # For 1TeSTvb4w2PWE81S2rEELgmX2GCCExQGT
|
||||||
user_inner_path = "data/users/1CjfbrbwtP8Y2QjPy12vpTATkUT7oSiPQ9/content.json"
|
user_inner_path = "data/users/1CjfbrbwtP8Y2QjPy12vpTATkUT7oSiPQ9/content.json"
|
||||||
data_dict = site.content_manager.contents[user_inner_path]
|
data_dict = site.storage.loadJson(user_inner_path)
|
||||||
users_content = site.content_manager.contents["data/users/content.json"]
|
users_content = site.content_manager.contents["data/users/content.json"]
|
||||||
|
|
||||||
data = StringIO(json.dumps(data_dict))
|
data = StringIO(json.dumps(data_dict))
|
||||||
|
|
Loading…
Reference in a new issue