From 30f7c0ea0e6cfaaadbe3ba4e4237895253bc8f20 Mon Sep 17 00:00:00 2001 From: "Lucas Perais (lpe)" Date: Mon, 25 Mar 2019 08:54:03 +0000 Subject: [PATCH] [FIX] account: tests reconciliation helper class Before this commit, test reconciliation was inherited by test reconciliation widget. It made the actual test_xx functions of the former being executed twice After this commit, we create an intermediary test class for setUp and helpers And the tests for each class execute only once --- addons/account/tests/test_reconciliation.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/addons/account/tests/test_reconciliation.py b/addons/account/tests/test_reconciliation.py index 4ca4a94404c..ba4c148fc66 100644 --- a/addons/account/tests/test_reconciliation.py +++ b/addons/account/tests/test_reconciliation.py @@ -5,7 +5,8 @@ import time import unittest -@tagged('post_install', '-at_install') +# TODO in master +# The name of this class should be TestReconciliationHelpers class TestReconciliation(AccountingTestCase): """Tests for reconciliation (account.tax) @@ -166,6 +167,10 @@ class TestReconciliation(AccountingTestCase): supplier_move_lines = bank_stmt.move_line_ids return customer_move_lines, supplier_move_lines + +@tagged('post_install', '-at_install') +class TestReconciliationExec(TestReconciliation): + def test_statement_usd_invoice_eur_transaction_eur(self): customer_move_lines, supplier_move_lines = self.make_customer_and_supplier_flows(self.currency_euro_id, 30, self.bank_journal_usd, 42, 30, self.currency_euro_id) self.assertRecordValues(customer_move_lines, [