def test_logger(self): logger = CLI.CommandLineInterface() logger.unknown_command("1232", "fff") logger.unknown_command("1232", "fff2") self.assertEqual(logger.log_number, 2) logger.unknown_command("2312","31112") self.assertEqual(logger.log_number , 3)
def __init__(self): self.host = '127.0.0.1' #localhost self.port = 50222 self.server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.running = True self.connected = 0 self.pi_client = None self.desktop_client = None self.logger = CLI.CommandLineInterface() self.eh = EncryptionHandler() self.server.bind((self.host, self.port)) self.server.listen() self.time_tracker = TimeTracker()