File: test_interface.py

package info (click to toggle)
libvirt-python 11.7.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,428 kB
  • sloc: ansic: 10,787; python: 4,604; xml: 910; makefile: 19
file content (15 lines) | stat: -rw-r--r-- 367 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import unittest
import libvirt


class TestLibvirtInterface(unittest.TestCase):
    def setUp(self):
        self.conn = libvirt.open("test:///default")
        self.iface = self.conn.interfaceLookupByName("eth1")

    def tearDown(self):
        self.iface = None
        self.conn = None

    def testAttr(self):
        self.assertEqual(self.iface.name(), "eth1")