(self, site)
| 14 | privatekey = "5KUh3PvNm5HUWoCfSUfcYvfQ2g3PrRNJWr6Q9eqdBGu23mtMntv" |
| 15 | |
| 16 | def testInclude(self, site): |
| 17 | # Rules defined in parent content.json |
| 18 | rules = site.content_manager.getRules("data/test_include/content.json") |
| 19 | |
| 20 | assert rules["signers"] == ["15ik6LeBWnACWfaika1xqGapRZ1zh3JpCo"] # Valid signer |
| 21 | assert rules["user_name"] == "test" # Extra data |
| 22 | assert rules["max_size"] == 20000 # Max size of files |
| 23 | assert not rules["includes_allowed"] # Don't allow more includes |
| 24 | assert rules["files_allowed"] == "data.json" # Allowed file pattern |
| 25 | |
| 26 | # Valid signers for "data/test_include/content.json" |
| 27 | valid_signers = site.content_manager.getValidSigners("data/test_include/content.json") |
| 28 | assert "15ik6LeBWnACWfaika1xqGapRZ1zh3JpCo" in valid_signers # Extra valid signer defined in parent content.json |
| 29 | assert "1TeSTvb4w2PWE81S2rEELgmX2GCCExQGT" in valid_signers # The site itself |
| 30 | assert len(valid_signers) == 2 # No more |
| 31 | |
| 32 | # Valid signers for "data/users/content.json" |
| 33 | valid_signers = site.content_manager.getValidSigners("data/users/content.json") |
| 34 | assert "1LSxsKfC9S9TVXGGNSM3vPHjyW82jgCX5f" in valid_signers # Extra valid signer defined in parent content.json |
| 35 | assert "1TeSTvb4w2PWE81S2rEELgmX2GCCExQGT" in valid_signers # The site itself |
| 36 | assert len(valid_signers) == 2 |
| 37 | |
| 38 | # Valid signers for root content.json |
| 39 | assert site.content_manager.getValidSigners("content.json") == ["1TeSTvb4w2PWE81S2rEELgmX2GCCExQGT"] |
| 40 | |
| 41 | def testInlcudeLimits(self, site, crypt_bitcoin_lib): |
| 42 | # Data validation |
nothing calls this directly
no test coverage detected