Пример #1
0
 def get_factory(self):
     """
     Return an instance of the book entry factory we are testing
     """
     factory = SageExpenseMain(get_config())
     factory.set_expense(self.get_base_expense())
     return factory
Пример #2
0
 def get_factory(self):
     """
     Return an instance of the book entry factory we are testing
     """
     factory = SageExpenseMain(get_config())
     factory.set_expense(self.get_base_expense())
     return factory
Пример #3
0
def test_expense_label_with_non_ascii_date(pyramid_request):
    pyramid_request.config = {
        "bookentry_expense_label_template": u'{expense_date:%B}',
    }
    from autonomie.compute.sage import SageExpenseMain

    expense_main = SageExpenseMain(context=None, request=pyramid_request)
    expense_main.set_expense(MagicMock(year=2018, month=12))

    assert expense_main.libelle == u'décembre'
Пример #4
0
def sage_expense(config_request, expense):
    factory = SageExpenseMain(None, config_request)
    factory.set_expense(expense)
    return factory
Пример #5
0
def sage_expense(config_request, expense):
    factory = SageExpenseMain(None, config_request)
    factory.set_expense(expense)
    return factory