test: Use capabilities query function in test scripts Signed-off-by: David Howells <dhowells@redhat.com>