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


Python SelectPaymentMethodSlave.set_client方法代码示例

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


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

示例1: test_set_client_without_credit_and_store_credit

# 需要导入模块: from stoqlib.gui.slaves.paymentmethodslave import SelectPaymentMethodSlave [as 别名]
# 或者: from stoqlib.gui.slaves.paymentmethodslave.SelectPaymentMethodSlave import set_client [as 别名]
    def test_set_client_without_credit_and_store_credit(self):
        slave = SelectPaymentMethodSlave(store=self.store,
                                         payment_type=Payment.TYPE_IN)
        client = self.create_client()

        slave.set_client(client, 100)
        self.check_slave(
            slave,
            'slave-select-payment-method-client-without-credit-and-store-credit')
开发者ID:Guillon88,项目名称:stoq,代码行数:11,代码来源:test_paymentmethodslave.py

示例2: test_set_client_with_enough_store_credit

# 需要导入模块: from stoqlib.gui.slaves.paymentmethodslave import SelectPaymentMethodSlave [as 别名]
# 或者: from stoqlib.gui.slaves.paymentmethodslave.SelectPaymentMethodSlave import set_client [as 别名]
    def test_set_client_with_enough_store_credit(self):
        slave = SelectPaymentMethodSlave(store=self.store,
                                         payment_type=Payment.TYPE_IN)
        client = self.create_client()
        client.credit_limit = 100

        slave.set_client(client, 100)
        self.check_slave(
            slave,
            'slave-select-payment-method-client-with-enough-store-credit')
开发者ID:Guillon88,项目名称:stoq,代码行数:12,代码来源:test_paymentmethodslave.py

示例3: test_set_client_with_enough_credit

# 需要导入模块: from stoqlib.gui.slaves.paymentmethodslave import SelectPaymentMethodSlave [as 别名]
# 或者: from stoqlib.gui.slaves.paymentmethodslave.SelectPaymentMethodSlave import set_client [as 别名]
    def test_set_client_with_enough_credit(self):
        slave = SelectPaymentMethodSlave(store=self.store,
                                         payment_type=Payment.TYPE_IN)
        client = self.create_client()
        method = self.store.find(PaymentMethod, method_name=u'credit').one()
        payment = self.create_payment(payment_type=Payment.TYPE_OUT,
                                      value=100, method=method)
        payment.group.payer = client.person
        payment.set_pending()
        payment.pay()

        slave.set_client(client, 100)
        self.check_slave(
            slave,
            'slave-select-payment-method-client-with-enough-credit')
开发者ID:Guillon88,项目名称:stoq,代码行数:17,代码来源:test_paymentmethodslave.py

示例4: test_set_client_none

# 需要导入模块: from stoqlib.gui.slaves.paymentmethodslave import SelectPaymentMethodSlave [as 别名]
# 或者: from stoqlib.gui.slaves.paymentmethodslave.SelectPaymentMethodSlave import set_client [as 别名]
    def test_set_client_none(self):
        slave = SelectPaymentMethodSlave(store=self.store,
                                         payment_type=Payment.TYPE_IN)

        slave.set_client(None, 100)
        self.check_slave(slave, 'slave-select-payment-method-client-none')
开发者ID:Guillon88,项目名称:stoq,代码行数:8,代码来源:test_paymentmethodslave.py


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