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())
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])
def test_pool_list_with_args(self): pool_command.pool_list( self.parser.parse_args(['pools', 'list', '--output', 'tsv']))