'Test getFileList'

def test_get_file_list(self):

    file_list = browser.getFileList(self.here, True, ['py', 'images'])
    self.assertIsNotNone(file_list)
    for entry in file_list:
        self.assertTrue(('name' in entry))
        self.assertTrue(('path' in entry))
        self.assertTrue(('isImage' in entry))
        self.assertTrue(('isFile' in entry))
        self.assertTrue(('isAllowed' in entry))
        if entry['name'].endswith(('.jpg', '.jpeg', '.png', '.tiff', '.gif')):
            self.assertTrue(entry['isImage'])
        else:
            self.assertFalse(entry['isImage'])
        if (entry['name'].endswith('.py') or entry['isImage']):
            self.assertTrue(entry['isFile'])
        else:
            self.assertFalse(entry['isFile'])
        self.assertTrue(entry['isAllowed'])
    file_list = browser.getFileList(self.here, False, [])
    self.assertIsNotNone(file_list)
    for entry in file_list:
        self.assertTrue(('name' in entry))
        self.assertTrue(('path' in entry))
        self.assertTrue(('isImage' in entry))
        self.assertTrue(('isFile' in entry))
        self.assertTrue(('isAllowed' in entry))
        self.assertFalse(entry['isImage'])
        self.assertFalse(entry['isFile'])
        self.assertTrue(entry['isAllowed'])
