'Check the output of list with asked stats.'

def test_listWithStat(self):

    self.createDirectory('ned')
    self.createFile('file.txt')
    d = self.shell.list(('.',), ('size', 'permissions'))
    def cb(l):
        l.sort()
        self.assertEqual(len(l), 2)
        self.assertEqual(l[0][0], 'file.txt')
        self.assertEqual(l[1][0], 'ned')
        self.assertEqual(len(l[0][1]), 2)
        self.assertEqual(len(l[1][1]), 2)
    return d.addCallback(cb)
