summaryrefslogtreecommitdiff
path: root/tests/test_conn.py
blob: 9fee099798c28bb266a3a0f9813dcd5941ef179f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

import unittest
import libvirt

class TestLibvirtConn(unittest.TestCase):
    def setUp(self):
        self.conn = libvirt.open("test:///default")

    def tearDown(self):
        self.conn = None

    def testConnDomainList(self):
        doms = self.conn.listAllDomains()
        self.assertEquals(len(doms), 1)
        self.assertEquals(type(doms[0]), libvirt.virDomain)
        self.assertEquals(doms[0].name(), "test")