From d9d8619bf1983a244f312c60d1bbd4a8dd25b16e Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Mon, 28 Nov 2011 17:28:17 +0100 Subject: [PATCH] [FIX] account: fixed yaml test in order to use demo data (creating a new fiscalyear and its periods was crashing buildbot) and moved this test as last one (because there is no way to reopen it for the following tests to create accounting entries in it) bzr revid: qdp-launchpad@openerp.com-20111128162817-9ldo7aq8ju9drugb --- addons/account/__openerp__.py | 2 +- .../test/account_fiscalyear_close_state.yml | 32 ++----------------- 2 files changed, 4 insertions(+), 30 deletions(-) diff --git a/addons/account/__openerp__.py b/addons/account/__openerp__.py index ec61248e147..c8d17c2cf9e 100644 --- a/addons/account/__openerp__.py +++ b/addons/account/__openerp__.py @@ -141,7 +141,6 @@ module named account_voucher. 'test/account_change_currency.yml', 'test/chart_of_account.yml', 'test/account_period_close.yml', - 'test/account_fiscalyear_close_state.yml', 'test/account_use_model.yml', 'test/account_validate_account_move.yml', 'test/account_fiscalyear_close.yml', @@ -149,6 +148,7 @@ module named account_voucher. 'test/account_cash_statement.yml', 'test/test_edi_invoice.yml', 'test/account_report.yml', + 'test/account_fiscalyear_close_state.yml', #last test, as it will definitively close the demo fiscalyear ], 'installable': True, 'active': False, diff --git a/addons/account/test/account_fiscalyear_close_state.yml b/addons/account/test/account_fiscalyear_close_state.yml index af4d05eba76..18c7dd570ed 100644 --- a/addons/account/test/account_fiscalyear_close_state.yml +++ b/addons/account/test/account_fiscalyear_close_state.yml @@ -1,31 +1,8 @@ - - - In order to check the Close a Fiscal Year wizard in OpenERP I first create a Fiscalyear -- - !record {model: account.fiscalyear, id: account_fiscalyear_fiscalyear0}: - code: !eval "'FY%s'% (datetime.now().year+1)" - company_id: base.main_company - date_start: !eval "'%s-01-01' %(datetime.now().year+1)" - date_stop: !eval "'%s-12-31' %(datetime.now().year+1)" - name: !eval "'Fiscal Year %s' %(datetime.now().year+1)" -- - I create monthly Periods for this fiscalyear -- - !python {model: account.fiscalyear}: | - self.create_period(cr, uid, [ref("account_fiscalyear_fiscalyear0")], {"lang": - 'en_US', "active_model": "ir.ui.menu", "active_ids": [ref("account.menu_action_account_fiscalyear_form")], - "tz": False, "active_id": ref("account.menu_action_account_fiscalyear_form"), - }) -- - I check that the fiscalyear state is "Draft" -- - !assert {model: account.fiscalyear, id: account_fiscalyear_fiscalyear0, string: Fiscal Year is in Draft state}: - - state == 'draft' -- - I run the Close a Fiscalyear wizard to close this fiscalyear + I run the Close a Fiscalyear wizard to close the demo fiscalyear - !record {model: account.fiscalyear.close.state, id: account_fiscalyear_close_state_0}: - fy_id: account_fiscalyear_fiscalyear0 + fy_id: data_fiscalyear - I clicked on Close States Button to close fiscalyear @@ -37,9 +14,6 @@ - I check that the fiscalyear state is now "Done" - - !assert {model: account.fiscalyear, id: account_fiscalyear_fiscalyear0, string: Fiscal Year is in Done state}: + !assert {model: account.fiscalyear, id: data_fiscalyear, string: Fiscal Year is in Done state}: - state == 'done' - - -