From 9a15cd80b6c99f32c2d653adb99cea9686576459 Mon Sep 17 00:00:00 2001 From: HelloZeroNet Date: Wed, 6 Apr 2016 13:44:31 +0200 Subject: [PATCH] Fix broken tests caused by removing signs from memory --- src/Test/TestContent.py | 3 +-- src/Test/TestContentUser.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Test/TestContent.py b/src/Test/TestContent.py index a4d617da..807feee0 100644 --- a/src/Test/TestContent.py +++ b/src/Test/TestContent.py @@ -107,7 +107,6 @@ class TestContent: site.content_manager.contents["content.json"]["optional"] = "((data/img/zero.*))" content_optional = site.content_manager.sign(privatekey="5KUh3PvNm5HUWoCfSUfcYvfQ2g3PrRNJWr6Q9eqdBGu23mtMntv", filewrite=False) - del site.content_manager.contents["content.json"]["optional"] content_nooptional = site.content_manager.sign(privatekey="5KUh3PvNm5HUWoCfSUfcYvfQ2g3PrRNJWr6Q9eqdBGu23mtMntv", filewrite=False) @@ -136,7 +135,7 @@ class TestContent: def testVerify(self, site): privatekey = "5KUh3PvNm5HUWoCfSUfcYvfQ2g3PrRNJWr6Q9eqdBGu23mtMntv" 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)) # Re-sign diff --git a/src/Test/TestContentUser.py b/src/Test/TestContentUser.py index dd4ea91b..6950ea66 100644 --- a/src/Test/TestContentUser.py +++ b/src/Test/TestContentUser.py @@ -66,7 +66,7 @@ class TestUserContent: def testVerify(self, site): privatekey = "5KUh3PvNm5HUWoCfSUfcYvfQ2g3PrRNJWr6Q9eqdBGu23mtMntv" # For 1TeSTvb4w2PWE81S2rEELgmX2GCCExQGT 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"] data = StringIO(json.dumps(data_dict))