summaryrefslogtreecommitdiff
path: root/tests/test_interface.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_interface.py')
-rw-r--r--tests/test_interface.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/test_interface.py b/tests/test_interface.py
new file mode 100644
index 0000000..2d7f7ec
--- /dev/null
+++ b/tests/test_interface.py
@@ -0,0 +1,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")