unit tests for py socket