本文整理汇总了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')
示例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')
示例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')
示例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')