示例#1
0
    def test_pool_list(self):
        cli.pool_set(
            self.parser.parse_args(['pools', 'set', 'foo', '1', 'test']))
        with self.assertLogs(level='INFO') as cm:
            cli.pool_list(self.parser.parse_args(['pools', 'list']))

        stdout = cm.output

        self.assertIn('foo', stdout[0])
示例#2
0
 def test_pool_delete(self):
     cli.pool_set(
         self.parser.parse_args(['pools', 'set', 'foo', '1', 'test']))
     cli.pool_delete(self.parser.parse_args(['pools', 'delete', 'foo']))
     self.assertEqual(self.session.query(Pool).count(), 1)
示例#3
0
 def test_pool_get(self):
     cli.pool_set(
         self.parser.parse_args(['pools', 'set', 'foo', '1', 'test']))
     cli.pool_get(self.parser.parse_args(['pools', 'get', 'foo']))