def test_sender_with_default_logger(self): """ Test that tries to check that Sender class can still use an internal logger and shows both local and remote traces """ try: engine_config = SenderConfigSSL(address=self.server, port=self.port, key=self.key, cert=self.cert, chain=self.chain) con = Sender(engine_config, tag=self.my_app) # NOTE: this logger logging traces will be visible in console con.logger.info("Testing Sender default handler functionality in " "local console... INFO - log") # NOTE: this logger logging traces will be visible in the remote # table con.info("Testing Sender default handler functionality in remote " "table... INFO - log") if len(con.socket.recv(5000)) == 0: raise Exception('Not msg sent!') con.close() except Exception as error: self.fail("Problems with test: %s" % error)
def test_Sender_with_default_logger(self): """ Test that tries to check that Sender class can still use an internal logger and shows both local and remote traces """ try: engine_config = SenderConfigSSL(address=self.server, port=self.port, key=self.key, cert=self.cert, chain=self.chain) con = Sender(engine_config, tag=self.my_app) for i in range(0, self.default_numbers_sendings): # NOTE: this logger logging traces will be visible in console con.logger.info( "Testing Sender default handler functionality in local console... INFO - log" ) # NOTE: this logger logging traces will be visible in the remote table con.info( "Testing Sender default handler functionality in remote table... INFO - log" ) con.close() except Exception as error: self.fail("Problems with test: %s" % error)