Esempio n. 1
0
    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"}
Esempio n. 2
0
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')
Esempio n. 3
0
 def testHelp(self):
     from cli.parser import StatTrackParser
     p = StatTrackParser(None)
     p.commands = [ HelpCommand() ]
     p.processCommandAndResponse("help")
     self.assertNotEqual(p.status, StatTrackParser.StatusError)