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


Python InvoicePrototype.check_frozen_expired_invoices方法代码示例

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


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

示例1: test_check_frozen_expired_invoices__wrong_state

# 需要导入模块: from the_tale.finances.bank.prototypes import InvoicePrototype [as 别名]
# 或者: from the_tale.finances.bank.prototypes.InvoicePrototype import check_frozen_expired_invoices [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

示例2: check_frozen_expired_invoices

# 需要导入模块: from the_tale.finances.bank.prototypes import InvoicePrototype [as 别名]
# 或者: from the_tale.finances.bank.prototypes.InvoicePrototype import check_frozen_expired_invoices [as 别名]
    def check_frozen_expired_invoices(self):

        if time.time() - float(settings.get(bank_settings.SETTINGS_LAST_FROZEN_EXPIRED_CHECK_KEY, 0)) < bank_settings.FROZEN_INVOICE_EXPIRED_CHECK_TIMEOUT:
            return

        settings[bank_settings.SETTINGS_LAST_FROZEN_EXPIRED_CHECK_KEY] = str(time.time())

        if not InvoicePrototype.check_frozen_expired_invoices():
            return

        self.logger.error('We have some expired frozen invoices. Please, check them and remove or find error.')
开发者ID:,项目名称:,代码行数:13,代码来源:

示例3: test_check_frozen_expired_invoices__exist

# 需要导入模块: from the_tale.finances.bank.prototypes import InvoicePrototype [as 别名]
# 或者: from the_tale.finances.bank.prototypes.InvoicePrototype import check_frozen_expired_invoices [as 别名]
 def test_check_frozen_expired_invoices__exist(self):
     invoice = self.create_invoice(state=INVOICE_STATE.FROZEN)
     InvoicePrototype._db_filter(id=invoice.id).update(
         updated_at=datetime.datetime.now() - bank_settings.FROZEN_INVOICE_EXPIRED_TIME
     )
     self.assertTrue(InvoicePrototype.check_frozen_expired_invoices())
开发者ID:lshestov,项目名称:the-tale,代码行数:8,代码来源:test_prototypes.py

示例4: test_check_frozen_expired_invoices__wrong_time

# 需要导入模块: from the_tale.finances.bank.prototypes import InvoicePrototype [as 别名]
# 或者: from the_tale.finances.bank.prototypes.InvoicePrototype import check_frozen_expired_invoices [as 别名]
 def test_check_frozen_expired_invoices__wrong_time(self):
     self.create_invoice(state=INVOICE_STATE.FROZEN)
     self.assertFalse(InvoicePrototype.check_frozen_expired_invoices())
开发者ID:lshestov,项目名称:the-tale,代码行数:5,代码来源:test_prototypes.py


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