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
def delete(self, folder_id): FoldersManager.delete(folder_id)
def test_delete_raises_forbidden_error_on_home_folder_delete( self, home_folder): with pytest.raises(Forbidden): FoldersManager.delete(home_folder.id)