示例#1
0
 def test_delete_removes_folder_with_items(self, sample_folder,
                                           sample_subfolder):
     sample_doc = commit(Document(folder=sample_folder, title="Test"))
     FoldersManager.delete(sample_folder.id)
     assert Folder.query.get(sample_folder.id) is None
     assert Folder.query.get(sample_subfolder.id) is None
     assert Document.query.get(sample_doc.id) is None
示例#2
0
 def delete(self, folder_id):
     FoldersManager.delete(folder_id)
示例#3
0
 def test_delete_raises_forbidden_error_on_home_folder_delete(
         self, home_folder):
     with pytest.raises(Forbidden):
         FoldersManager.delete(home_folder.id)