@pytest.fixture
def mock_socket():
    mocksock = mock.Mock(spec=socket.socket)
    return mocksock
returns a mock object with socket.socket interface
dataset/ETHPy150Open pyGrowler/Growler/tests/mocks/__init__.py/mock_socket