Allow tests to be properly skipped if `mock` is not installed.
Fix test expected output plus an additional one for pip git install.