def __init__(self, name, db=None, rules=None): from cli.parser import StatTrackParser self.name = name self.db = db self.rules = rules self.parser = StatTrackParser(self) self.property = {"isAuctionDraft":"false"}
class League(object): def __init__(self, name, db=None, rules=None): from cli.parser import StatTrackParser self.name = name self.db = db self.rules = rules self.parser = StatTrackParser(self) self.property = {"isAuctionDraft":"false"} def draftmode(self): self.parser.promptLoop() def update(self): if self.db is not None: self.db.update() def factoryReset(self): raise ValueError('factoryReset is not implemented')
def testHelp(self): from cli.parser import StatTrackParser p = StatTrackParser(None) p.commands = [ HelpCommand() ] p.processCommandAndResponse("help") self.assertNotEqual(p.status, StatTrackParser.StatusError)