From 2ab69da5ca4106df00816057e5da4922f97e81dd Mon Sep 17 00:00:00 2001 From: Quentin Defenouillere Date: Wed, 21 Nov 2018 17:07:13 +0100 Subject: [PATCH] [capabilities/bank/test] Don't check code_type if code = "XX-liquidity" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Everytime we test a module handling liquidities we have this error: "Investment "Liquidités" has code but no code_type" This error is pointless since the "Liquidités" code_type is always NotAvailable so I precised in the "if inv.code" to check if the inv.code is not "XX-liquidity". --- weboob/tools/capabilities/bank/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weboob/tools/capabilities/bank/test.py b/weboob/tools/capabilities/bank/test.py index ade2f77ce8..e2ce81e8da 100644 --- a/weboob/tools/capabilities/bank/test.py +++ b/weboob/tools/capabilities/bank/test.py @@ -152,7 +152,7 @@ def check_investments(self, account): def check_investment(self, account, inv): self.assertTrue(inv.label, 'investment %r has no label' % inv) self.assertTrue(inv.valuation, 'investment %r has no valuation' % inv) - if inv.code: + if inv.code and inv.code != 'XX-liquidity': self.assertTrue(inv.code_type, 'investment %r has code but no code type' % inv) if inv.code_type == inv.CODE_TYPE_ISIN and inv.code and not inv.code.startswith('XX'): self.assertTrue(is_isin_valid(inv.code), 'investment %r has invalid ISIN: %r' % (inv, inv.code)) -- GitLab