class DummyConnection: def __init__(self): self.parser = Parser(DummyPuppet( )) self.data = "" self.parser.getPuppet().connection = self def sendLine(self, line): self.data = self.data + line def recvLine(self, line): return self.parser.parseLine(line)
def __init__(self): self.parser = Parser(DummyPuppet( )) self.data = "" self.parser.getPuppet().connection = self