From 751890718f61bdc3cc5c8f708d26530517aeb507 Mon Sep 17 00:00:00 2001 From: Ronald Portier Date: Wed, 8 Aug 2018 13:16:41 +0200 Subject: [PATCH] [IMP] More debugging info in import tests. --- .../tests/test_import_file.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/account_bank_statement_import/tests/test_import_file.py b/account_bank_statement_import/tests/test_import_file.py index 3047cac..9affb21 100644 --- a/account_bank_statement_import/tests/test_import_file.py +++ b/account_bank_statement_import/tests/test_import_file.py @@ -66,13 +66,12 @@ class TestStatementFile(TransactionCase): # We will get assertion error, but to solve we need to see # what transactions have been added: self.cr.execute( - "select name, date, amount, ref, bank_account_id" - " from account_bank_statement_line" - " where statement_id=%d" % statement_obj.id) + "SELECT statement_id, name, date, amount, ref, bank_account_id" + " FROM account_bank_statement_line" + " WHERE statement_id=%s", (statement_obj.id, )) _logger.error( - "Transaction not found in %s" % - str(self.cr.fetchall()) - ) + "No transaction with domain %s found in %s" % + (str(domain), str(self.cr.fetchall()))) self.assertTrue( ids, 'Transaction %s not found after parse.' % str(domain)