From 573984b798ef03d3acfcaef5a0e963f70031420d Mon Sep 17 00:00:00 2001 From: Quentin Defenouillere Date: Wed, 28 Nov 2018 17:04:17 +0100 Subject: [PATCH] [weboob.tests] Added "if" condition on transaction amounts There are errors raised in the backend when a transaction has an amount if "0.00". However these transactions actually exist, so we should check whether the amount is None and not if the balance is != 0. --- weboob/tools/capabilities/bank/test.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/weboob/tools/capabilities/bank/test.py b/weboob/tools/capabilities/bank/test.py index e2ce81e8da..06f1b6a0b5 100644 --- a/weboob/tools/capabilities/bank/test.py +++ b/weboob/tools/capabilities/bank/test.py @@ -117,7 +117,8 @@ def check_transaction(self, account, tr, coming): today = date.today() self.assertFalse(empty(tr.date), 'transaction %r has no debit date' % tr) - self.assertTrue(tr.amount, 'transaction %r has no amount' % tr) + if tr.amount != 0: + self.assertTrue(tr.amount, 'transaction %r has no amount' % tr) self.assertFalse(empty(tr.raw) and empty(tr.label), 'transaction %r has no raw or label' % tr) if coming: -- GitLab