Forking what is left of ZeroNet and hopefully adding an AT Proto Frontend/Proxy
at main 25 lines 747 B view raw
1import pytest 2 3 4@pytest.mark.usefixtures("resetSettings") 5class TestSiteStorage: 6 def testWalk(self, site): 7 # Rootdir 8 walk_root = list(site.storage.walk("")) 9 assert "content.json" in walk_root 10 assert "css/all.css" in walk_root 11 12 # Subdir 13 assert list(site.storage.walk("data-default")) == ["data.json", "users/content-default.json"] 14 15 def testList(self, site): 16 # Rootdir 17 list_root = list(site.storage.list("")) 18 assert "content.json" in list_root 19 assert "css/all.css" not in list_root 20 21 # Subdir 22 assert set(site.storage.list("data-default")) == set(["data.json", "users"]) 23 24 def testDbRebuild(self, site): 25 assert site.storage.rebuildDb()