'Test listing callbacks with different rights.'

def test_list(self):

    table = self.call(CmdCallback(), 'out')
    lines = table.splitlines()[3:(-1)]
    self.assertNotEqual(lines, [])
    for line in lines:
        cols = line.split('|')
        self.assertIn(cols[2].strip(), ('0    (0)', ''))
    self.handler.add_callback(self.exit, 'traverse', 'pass', author=self.char1, valid=True)
    table = self.call(CmdCallback(), 'out    =    traverse')
    lines = table.splitlines()[3:(-1)]
    self.assertEqual(len(lines), 1)
    line = lines[0]
    cols = line.split('|')
    self.assertIn(cols[1].strip(), ('1', ''))
    self.assertIn(cols[2].strip(), (str(self.char1), ''))
    self.assertIn(cols[(-1)].strip(), ('Yes', 'No', ''))
    table = self.call(CmdCallback(), 'out    =    traverse', caller=self.char2)
    lines = table.splitlines()[3:(-1)]
    self.assertEqual(len(lines), 1)
    line = lines[0]
    cols = line.split('|')
    self.assertEqual(cols[1].strip(), '1')
    self.assertNotIn(cols[(-1)].strip(), ('Yes', 'No'))
    details = self.call(CmdCallback(), 'out    =    traverse    1')
    self.assertEqual(details.splitlines()[(-1)], 'pass')
