def test_close_connection(self): smb = self.create_connection() smb.login(self.username, self.password, self.domain) smb_connection_socket = smb.getSMBServer().get_socket() self.assertTrue(self.__is_socket_opened(smb_connection_socket) == True) smb.close() self.assertTrue(self.__is_socket_opened(smb_connection_socket) == False) del(smb)