From f455fbf1e6ffd5c21304761220f09197f1756f2c Mon Sep 17 00:00:00 2001 From: Florent Date: Thu, 26 Apr 2012 19:15:38 +0200 Subject: [PATCH] Small cleanup 1) Remove the todo, ING coming doesn't provide usefull information 2) yield account instead to create a list 3) remove coming in the test (not implemented) --- modules/ing/backend.py | 6 ------ modules/ing/pages/accounts_list.py | 5 +---- modules/ing/test.py | 1 - 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/modules/ing/backend.py b/modules/ing/backend.py index baf1b701..91ebcf6e 100644 --- a/modules/ing/backend.py +++ b/modules/ing/backend.py @@ -74,9 +74,3 @@ class INGBackend(BaseBackend, ICapBank): with self.browser: for history in self.browser.get_history(account.id): yield history - - # TODO - #def iter_coming(self, account): - # with self.browser: - # for coming in self.browser.get_coming_operations(account.id): - # yield coming diff --git a/modules/ing/pages/accounts_list.py b/modules/ing/pages/accounts_list.py index cfc59054..d9e21499 100644 --- a/modules/ing/pages/accounts_list.py +++ b/modules/ing/pages/accounts_list.py @@ -34,7 +34,6 @@ class AccountsList(BasePage): pass def get_list(self): - l = [] ids = [] for td in self.document.xpath('.//td[@nowrap="nowrap"]'): account = Account() @@ -50,6 +49,4 @@ class AccountsList(BasePage): account.balance = Decimal(linkbis.text.replace('.', '').\ replace(' ', '').replace(',', '.')) account.coming = NotAvailable - l.append(account) - - return l + yield account diff --git a/modules/ing/test.py b/modules/ing/test.py index ab420203..e3a3a445 100644 --- a/modules/ing/test.py +++ b/modules/ing/test.py @@ -28,5 +28,4 @@ class INGTest(BackendTest): l = list(self.backend.iter_accounts()) if len(l) > 0: a = l[0] - list(self.backend.iter_coming(a)) list(self.backend.iter_history(a))