Codebase list libvirt-glib / f05f74b
Add autopkg test to verify the gir works Guido Günther 8 years ago
2 changed file(s) with 23 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 Tests: smoke.py
1 Depends: gir1.2-libvirt-glib-1.0,
2 python3-gi
3
0 #!/usr/bin/python3
1 #
2 # Check that we cann connect to the test driver
3 # to verify GObject introspection is working
4
5 import sys
6
7 import gi
8 gi.require_version('LibvirtGObject', '1.0')
9 from gi.repository import LibvirtGObject
10
11 conn = LibvirtGObject.Connection.new("test:///default")
12 assert conn is not None
13 assert conn.open_read_only() is True
14 caps = conn.get_capabilities()
15 assert caps is not None
16 assert len(caps.get_guests()) != 0
17
18 sys.exit(0)