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


Python InvoicePrototype._db_all方法代码示例

本文整理汇总了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()
开发者ID:lshestov,项目名称:the-tale,代码行数:10,代码来源:test_prototypes.py

示例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()
开发者ID:lshestov,项目名称:the-tale,代码行数:10,代码来源:test_prototypes.py

示例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)
开发者ID:Alkalit,项目名称:the-tale,代码行数:29,代码来源:test_requests.py


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