From e61daa64c6b39aa2b79db14541e0bc453adae946 Mon Sep 17 00:00:00 2001 From: Florent Date: Tue, 9 Jul 2013 11:21:32 +0200 Subject: [PATCH] Real tests for ING module --- modules/ing/test.py | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/modules/ing/test.py b/modules/ing/test.py index e3a3a445..127be182 100644 --- a/modules/ing/test.py +++ b/modules/ing/test.py @@ -19,13 +19,24 @@ from weboob.tools.test import BackendTest +from weboob.capabilities.bank import Account class INGTest(BackendTest): BACKEND = 'ing' - def test_ing(self): + def test_accounts(self): l = list(self.backend.iter_accounts()) - if len(l) > 0: - a = l[0] - list(self.backend.iter_history(a)) + for account in l: + if account.type == Account.TYPE_CHECKING or account.type == Account.TYPE_CHECKING: + history = list(self.backend.iter_history(account)) + self.assertTrue(len(history) > 0) + elif account.type == Account.TYPE_MARKET: + invest = list(self.backend.iter_investment(account)) + self.assertTrue(len(invest) > 0) + + def test_subscriptions(self): + l = list(self.backend.iter_subscription()) + for sub in l: + bills = list(self.backend.iter_bills(sub)) + self.assertTrue(len(bills) > 0)