# Path: cliff/lister.py
# class Lister(display.DisplayCommandBase, metaclass=abc.ABCMeta):
#     def formatter_namespace(self):
#     def formatter_default(self):
#     def need_sort_by_cliff(self):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def produce_output(self, parsed_args, column_names, data):


import weakref
from unittest import mock
from cliff import lister
from cliff.tests import base

        test_lister.run(parsed_args)

        f = test_lister._formatter_plugins['test']
        args = f.args[0]
        data = list(args[1])
        self.assertEqual([['a', 'A'], ['b', 'B'], ['c', 'A']], data)

    def test_sort_by_column_with_null(self):
        test_lister = ExerciseListerNullValues(mock.Mock(), [])
        parsed_args = mock.Mock()
        parsed_args.columns = ('Col1', 'Col2')
        parsed_args.formatter = 'test'
        parsed_args.sort_columns = ['Col2', 'Col1']

        test_lister.run(parsed_args)

        f = test_lister._formatter_plugins['test']
        args = f.args[0]
        data = list(args[1])
        self.assertEqual(
            [['a', 'A'], ['c', 'A'], ['b', 'B'], [None, None]], data)

    def test_sort_by_column_with_different_types(self):
        test_lister = ExerciseListerDifferentTypes(mock.Mock(), [])
        parsed_args = mock.Mock()
        parsed_args.columns = ('Col1', 'Col2')
        parsed_args.formatter = 'test'
        parsed_args.sort_columns = ['Col2', 'Col1']


# Path: cliff/lister.py
# class Lister(display.DisplayCommandBase, metaclass=abc.ABCMeta):
#     def formatter_namespace(self):
#     def formatter_default(self):
#     def need_sort_by_cliff(self):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def produce_output(self, parsed_args, column_names, data):


# Path: cliff/tests/test_lister.py
import weakref
from unittest import mock
from cliff import lister
from cliff.tests import base


        test_lister.run(parsed_args)

        f = test_lister._formatter_plugins['test']
        args = f.args[0]
        data = list(args[1])
        self.assertEqual([['a', 'A'], ['b', 'B'], ['c', 'A']], data)

    def test_sort_by_column_with_null(self):
        test_lister = ExerciseListerNullValues(mock.Mock(), [])
        parsed_args = mock.Mock()
        parsed_args.columns = ('Col1', 'Col2')
        parsed_args.formatter = 'test'
        parsed_args.sort_columns = ['Col2', 'Col1']

        test_lister.run(parsed_args)

        f = test_lister._formatter_plugins['test']
        args = f.args[0]
        data = list(args[1])
        self.assertEqual(
            [['a', 'A'], ['c', 'A'], ['b', 'B'], [None, None]], data)

    def test_sort_by_column_with_different_types(self):
        test_lister = ExerciseListerDifferentTypes(mock.Mock(), [])
        parsed_args = mock.Mock()
        parsed_args.columns = ('Col1', 'Col2')
        parsed_args.formatter = 'test'
        parsed_args.sort_columns = ['Col2', 'Col1']


        with mock.patch.object(lister.Lister, 'log') as mock_log: