当前位置: 首页>>代码示例>>Python>>正文


Python Harness.make_participant方法代码示例

本文整理汇总了Python中gittip.testing.Harness.make_participant方法的典型用法代码示例。如果您正苦于以下问题:Python Harness.make_participant方法的具体用法?Python Harness.make_participant怎么用?Python Harness.make_participant使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在gittip.testing.Harness的用法示例。


在下文中一共展示了Harness.make_participant方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: make_participant

# 需要导入模块: from gittip.testing import Harness [as 别名]
# 或者: from gittip.testing.Harness import make_participant [as 别名]
 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
开发者ID:joealcorn,项目名称:www.gittip.com,代码行数:12,代码来源:test_take.py

示例2: make_participant

# 需要导入模块: from gittip.testing import Harness [as 别名]
# 或者: from gittip.testing.Harness import make_participant [as 别名]
 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
开发者ID:angleman,项目名称:www.gittip.com,代码行数:13,代码来源:test_take.py

示例3: make_participant

# 需要导入模块: from gittip.testing import Harness [as 别名]
# 或者: from gittip.testing.Harness import make_participant [as 别名]
 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
开发者ID:atunit,项目名称:www.gittip.com,代码行数:14,代码来源:test_take.py

示例4: make_participant

# 需要导入模块: from gittip.testing import Harness [as 别名]
# 或者: from gittip.testing.Harness import make_participant [as 别名]
 def make_participant(self, *a, **kw):
     kw['claimed_time'] = datetime.datetime.now(pytz.utc)
     return Harness.make_participant(self, *a, **kw)
开发者ID:ChimeraCoder,项目名称:www.gittip.com,代码行数:5,代码来源:test_public_json.py

示例5: make_participant

# 需要导入模块: from gittip.testing import Harness [as 别名]
# 或者: from gittip.testing.Harness import make_participant [as 别名]
 def make_participant(self, *a, **kw):
     kw['claimed_time'] = utcnow()
     return Harness.make_participant(self, *a, **kw)
开发者ID:Alive-AttemptTheLifeGangHouse,项目名称:www.gittip.com,代码行数:5,代码来源:test_public_json.py


注:本文中的gittip.testing.Harness.make_participant方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。