def test_pool_list(self):
        pool_command.pool_set(
            self.parser.parse_args(['pools', 'set', 'foo', '1', 'test']))
        with redirect_stdout(io.StringIO()) as stdout:
            pool_command.pool_list(self.parser.parse_args(['pools', 'list']))

        self.assertIn('foo', stdout.getvalue())
Exemplo n.º 2
0
    def test_pool_list(self):
        pool_command.pool_set(
            self.parser.parse_args(['pools', 'set', 'foo', '1', 'test']))
        with self.assertLogs(level='INFO') as cm:
            pool_command.pool_list(self.parser.parse_args(['pools', 'list']))

        stdout = cm.output

        self.assertIn('foo', stdout[0])
Exemplo n.º 3
0
 def test_pool_list_with_args(self):
     pool_command.pool_list(
         self.parser.parse_args(['pools', 'list', '--output', 'tsv']))