class SocketInitializationTest(unittest.TestCase): """ Testing socket initialization process """ def setUp(self): self.options = {'HOST': 'localhost', 'PORT': 8030, 'FAMILY': AF_INET, 'TYPE': SOCK_STREAM} self.socket = None def tearDown(self): self.socket.__close_socket__() def test_init_socket(self): """ Testing Main Wrapper GsSocket Class Initialization and socket creation """ self.socket = GsSocket(**self.options) self.socket.__create_socket__()
def __init__(self, *args, **kwargs): GsSocket.__init__(self, *args, **kwargs) self.clients = set() self.__create_socket__(server=True)
def test_init_socket(self): """ Testing Main Wrapper GsSocket Class Initialization and socket creation """ self.socket = GsSocket(**self.options) self.socket.__create_socket__()