tests: Add test for Python version of long socket name workaround.