[th/test-client-fixes] fix test-client.py test

Merged Thomas Haller requested to merge th/test-client-fixes into main

The test doesn't work with python2, which breaks copr builds (against epel7). Fix that (by skipping the test).

Also, fix a leak warning.

Also, don't do os.dup2(s.fileno(), 3), when we can just pass the original FD on.

Merge request reports