Commit 2ab69da5 authored by Quentin Defenouillere's avatar Quentin Defenouillere Committed by Romain Bignon

[capabilities/bank/test] Don't check code_type if code = "XX-liquidity"

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".
parent f13752e8
......@@ -152,7 +152,7 @@ class BankStandardTest(object):
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))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment