test: Factor out code to connect a mock shim
test: Factor out code to connect a mock shim

Here again, we can makes the code look a bit nicer by introducing a
function creating and connecting a mock shim object.

Signed-off-by: Damien Lespiau <64bd3cb94f359c1a3ce68dae5e26b40578526277@intel.com>

dlespiau/proxy,dlespiau/proxy,dlespiau/clearcontainers-proxy,clearcontainers/proxy,dlespiau/clearcontainers-proxy,clearcontainers/proxy