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


Python testing.Harness类代码示例

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


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

示例1: setUp

    def setUp(self):
        Harness.setUp(self)

        # Alice joins a community.
        self.alice = self.make_participant('alice', balance=100)
        self.client.POST('/alice/communities.json', {'do': 'join:something'},
                         auth_as=self.alice, xhr=True)
开发者ID:kthurimella,项目名称:liberapay.com,代码行数:7,代码来源:test_communities.py

示例2: setUp

    def setUp(self):
        Harness.setUp(self)

        # Alice joins a community.
        self.alice = self.make_participant('alice', balance=100)
        c = self.alice.create_community('C++')
        self.alice.upsert_community_membership(True, c.id)
开发者ID:devmiyax,项目名称:liberapay.com,代码行数:7,代码来源:test_communities.py

示例3: setUp

    def setUp(self):
        Harness.setUp(self)

        # Alice joins a community.
        self.alice = self.make_participant('alice', balance=100)
        c = self.alice.create_community('something')
        self.alice.update_community_status('memberships', True, c.id)
开发者ID:Calinou,项目名称:liberapay.com,代码行数:7,代码来源:test_communities.py

示例4: setUp

    def setUp(self):
        Harness.setUp(self)

        # Alice joins a community.
        self.alice = self.make_participant('alice', balance=100)
        self.client.POST('/alice/communities.json', {'do': 'join:something'},
                         auth_as=self.alice, HTTP_X_REQUESTED_WITH=b'XMLHttpRequest')
开发者ID:Changaco,项目名称:liberapay.com,代码行数:7,代码来源:test_communities.py

示例5: setUp

 def setUp(self):
     Harness.setUp(self)
     self.david = self.make_participant(
         "david",
         is_suspicious=False,
         mangopay_user_id=self.david_id,
         mangopay_wallet_id=self.david_wallet_id,
         email="[email protected]",
     )
     self.janet = self.make_participant(
         "janet",
         is_suspicious=False,
         mangopay_user_id=self.janet_id,
         mangopay_wallet_id=self.janet_wallet_id,
         email="[email protected]",
     )
     self.janet_route = ExchangeRoute.insert(self.janet, "mango-cc", self.card_id)
     self.homer = self.make_participant(
         "homer",
         is_suspicious=False,
         mangopay_user_id=self.homer_id,
         mangopay_wallet_id=self.homer_wallet_id,
         email="[email protected]",
     )
     self.homer_route = ExchangeRoute.insert(self.homer, "mango-ba", self.bank_account.Id)
开发者ID:kthurimella,项目名称:liberapay.com,代码行数:25,代码来源:mangopay.py

示例6: setUp

 def setUp(self):
     Harness.setUp(self)
     self.mailer_patcher = mock.patch.object(Participant._mailer.messages, 'send')
     self.mailer = self.mailer_patcher.start()
     self.addCleanup(self.mailer_patcher.stop)
     sleep_patcher = mock.patch('liberapay.models.participant.sleep')
     sleep_patcher.start()
     self.addCleanup(sleep_patcher.stop)
开发者ID:Changaco,项目名称:liberapay.com,代码行数:8,代码来源:emails.py

示例7: setUp

    def setUp(self):
        Harness.setUp(self)

        # Grab configuration from the environment, storing for later.
        env = wireup.env()
        self.environ = env.environ

        # Change env, doesn't change self.environ.
        env.canonical_scheme = 'https'
        env.canonical_host = 'example.com'

        wireup.canonical(env)
开发者ID:kthurimella,项目名称:liberapay.com,代码行数:12,代码来源:test_hooks.py

示例8: setUp

 def setUp(self):
     Harness.setUp(self)
     self.david = self.make_participant(
         'david', mangopay_user_id=self.david_id,
         mangopay_wallet_id=self.david_wallet_id, email='[email protected]'
     )
     self.janet = self.make_participant(
         'janet', mangopay_user_id=self.janet_id,
         mangopay_wallet_id=self.janet_wallet_id, email='[email protected]'
     )
     self.janet_route = ExchangeRoute.insert(self.janet, 'mango-cc', self.card_id)
     self.homer = self.make_participant(
         'homer', mangopay_user_id=self.homer_id,
         mangopay_wallet_id=self.homer_wallet_id, email='[email protected]'
     )
     self.homer_route = ExchangeRoute.insert(self.homer, 'mango-ba', self.bank_account.Id)
开发者ID:Calinou,项目名称:liberapay.com,代码行数:16,代码来源:mangopay.py

示例9: setUp

 def setUp(self):
     Harness.setUp(self)
     self.team = self.make_participant("team", kind='group')
     self.alice = self.make_participant("alice")
开发者ID:Changaco,项目名称:liberapay.com,代码行数:4,代码来源:test_membername_json.py

示例10: setUp

 def setUp(self):
     Harness.setUp(self)
     self.alice = self.make_participant('alice')
     self.bob = self.make_participant('bob')
开发者ID:liberapay,项目名称:liberapay.com,代码行数:4,代码来源:test_newsletters.py

示例11: setUp

 def setUp(self):
     Harness.setUp(self)
     make_history(self)
开发者ID:CryptArc,项目名称:liberapay.com,代码行数:3,代码来源:test_history.py

示例12: setUp

 def setUp(self):
     Harness.setUp(self)
     self.stub = self.make_stub()  # Our protagonist
开发者ID:kthurimella,项目名称:liberapay.com,代码行数:3,代码来源:test_participant.py

示例13: setUp

 def setUp(self):
     Harness.setUp(self)
     self.client.website.canonical_scheme = 'https'
     self.client.website.canonical_host = 'example.com'
开发者ID:fracolo,项目名称:liberapay.com,代码行数:4,代码来源:test_hooks.py

示例14: setUp

 def setUp(self):
     Harness.setUp(self)
     self.bar = self.make_participant('bar', is_admin=True)
开发者ID:kthurimella,项目名称:liberapay.com,代码行数:3,代码来源:test_is_suspicious.py

示例15: tearDown

 def tearDown(self):
     Harness.tearDown(self)
     reset = Environment(CANONICAL_SCHEME=unicode, CANONICAL_HOST=unicode, environ=self.environ)
     wireup.canonical(reset)
开发者ID:kthurimella,项目名称:liberapay.com,代码行数:4,代码来源:test_hooks.py


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