示例#1
0
 def make_participant(self, username, *arg, **kw):
     participant = Harness.make_participant(self, username)
     if username == "alice":
         take_last_week = kw.get("take_last_week", "40")
         gittip.db.execute("INSERT INTO paydays DEFAULT VALUES")
         gittip.db.execute(
             "INSERT INTO transfers " "(timestamp, tipper, tippee, amount) " "VALUES (now(), 'Team', 'alice', %s)",
             (take_last_week,),
         )
     return participant
示例#2
0
 def make_participant(self, username, *arg, **kw):
     take_last_week = kw.pop('take_last_week', '40')
     participant = Harness.make_participant(self, username, **kw)
     if username == 'alice':
         gittip.db.run("INSERT INTO paydays DEFAULT VALUES")
         gittip.db.run(
             "INSERT INTO transfers "
             "(timestamp, tipper, tippee, amount) "
             "VALUES (now(), 'Team', 'alice', %s)", (take_last_week, ))
     return participant
示例#3
0
 def make_participant(self, username, *arg, **kw):
     take_last_week = kw.pop('take_last_week', '40')
     participant = Harness.make_participant(self, username, **kw)
     if username == 'alice':
         gittip.db.run("INSERT INTO paydays DEFAULT VALUES")
         gittip.db.run( "INSERT INTO transfers "
                        "(timestamp, tipper, tippee, amount) "
                        "VALUES (now(), 'Team', 'alice', %s)"
                      , (take_last_week,)
                       )
     return participant
示例#4
0
 def make_participant(self, username, **kw):
     take_last_week = kw.pop('take_last_week', None)
     team_name = kw.pop('', TEAM)
     participant = Harness.make_participant(self, username, **kw)
     if take_last_week is not None:
         if self.db.one('SELECT * FROM paydays') is None:
             self.db.run("INSERT INTO paydays DEFAULT VALUES")
         self.db.run( "INSERT INTO transfers (timestamp, tipper, tippee, amount) "
                      "VALUES (now(), %(tipper)s, %(tippee)s, %(amount)s)"
                    , dict(tipper=team_name, tippee=username, amount=take_last_week,)
                     )
     return participant
示例#5
0
 def make_participant(self, *a, **kw):
     kw['claimed_time'] = utcnow()
     return Harness.make_participant(self, *a, **kw)
示例#6
0
 def make_participant(self, *a, **kw):
     kw['claimed_time'] = datetime.datetime.now(pytz.utc)
     return Harness.make_participant(self, *a, **kw)
 def make_participant(self, *a, **kw):
     kw['claimed_time'] = datetime.datetime.now(pytz.utc)
     return Harness.make_participant(self, *a, **kw)
 def make_participant(self, *a, **kw):
     kw['claimed_time'] = utcnow()
     return Harness.make_participant(self, *a, **kw)