def test_subfolders(self):
     from collective.team.browser.add_wizard import AddWizard
     view = AddWizard(None, None)
     view.context = {'folder1' : Mock()}
     view.request = Mock()
     folders = [Mock()]
     view.context['folder1'].getFolderContents = lambda: folders
     folders[0].id = 'folder2'
     folders[0].Title = 'Title2'
     self.assertEquals('[{"value": "Title2", "key": "folder2"}]',
                       view.subfolders('folder1'))
 def test_additional_folders(self):
     """
     Additional folders ignores some folders, like bilder
     """
     from collective.team.browser.add_wizard import AddWizard
     view = AddWizard(None, None)
     view.context = Mock()
     folders = [Mock(), Mock()]
     view.context.getFolderContents = lambda x: folders
     folders[0].id = 'bilder'
     folders[1].id = 'folder1'
     folders[1].Title = 'Title1'
     self.assertEquals([{'value': 'Title1', 'key': 'folder1'}],
                       view.additional_folders)