Add autopkg test to verify the gir works
Guido Günther
8 years ago
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) |