本文整理汇总了Python中the_tale.finances.bank.prototypes.InvoicePrototype._db_all方法的典型用法代码示例。如果您正苦于以下问题:Python InvoicePrototype._db_all方法的具体用法?Python InvoicePrototype._db_all怎么用?Python InvoicePrototype._db_all使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类the_tale.finances.bank.prototypes.InvoicePrototype
的用法示例。
在下文中一共展示了InvoicePrototype._db_all方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_get_unprocessed_invoice_success
# 需要导入模块: from the_tale.finances.bank.prototypes import InvoicePrototype [as 别名]
# 或者: from the_tale.finances.bank.prototypes.InvoicePrototype import _db_all [as 别名]
def test_get_unprocessed_invoice_success(self):
for state in INVOICE_STATE.records:
if not (state.is_REQUESTED or state.is_FORCED):
continue
invoice = self.create_invoice(state=state)
self.assertEqual(InvoicePrototype.get_unprocessed_invoice().id, invoice.id)
InvoicePrototype._db_all().delete()
示例2: test_check_frozen_expired_invoices__wrong_state
# 需要导入模块: from the_tale.finances.bank.prototypes import InvoicePrototype [as 别名]
# 或者: from the_tale.finances.bank.prototypes.InvoicePrototype import _db_all [as 别名]
def test_check_frozen_expired_invoices__wrong_state(self):
for state in INVOICE_STATE.records:
if state.is_FROZEN:
continue
self.create_invoice(state=state)
self.assertFalse(InvoicePrototype.check_frozen_expired_invoices())
InvoicePrototype._db_all().delete()
示例3: test_history
# 需要导入模块: from the_tale.finances.bank.prototypes import InvoicePrototype [as 别名]
# 或者: from the_tale.finances.bank.prototypes.InvoicePrototype import _db_all [as 别名]
def test_history(self):
self.create_bank_account(self.account.id)
history = self.create_entity_history(self.account.id)
invoices = BankInvoicePrototype._db_all()
histroy_ids = [invoice.id for invoice in history]
texts = [('pgf-no-history-message', 0)]
for invoice in invoices:
if invoice.id in histroy_ids:
continue
if invoice.recipient_id == self.account.id:
texts.append((invoice.description_for_recipient, 0))
else:
texts.append((invoice.description_for_sender, 0))
for invoice in history:
if invoice.recipient_id == self.account.id:
texts.append((invoice.description_for_recipient, 1))
texts.append((invoice.description_for_sender, 0))
else:
texts.append((invoice.description_for_recipient, 0))
texts.append((invoice.description_for_sender, 1))
self.check_html_ok(self.request_html(self.page_url), texts=texts)