From fb58e0c8fbe0131c330be57c4dc80b506d52b196 Mon Sep 17 00:00:00 2001 From: "P. Christeas" Date: Sat, 27 Nov 2010 22:13:48 +0200 Subject: [PATCH] l10n_ch: port yaml tests to test_reports utility. bzr revid: p_christ@hol.gr-20101127201348-2khma0uejh5fqm2d --- addons/l10n_ch/test/l10n_ch_report.yml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/addons/l10n_ch/test/l10n_ch_report.yml b/addons/l10n_ch/test/l10n_ch_report.yml index 5b2a636813e..b07c574e5ad 100644 --- a/addons/l10n_ch/test/l10n_ch_report.yml +++ b/addons/l10n_ch/test/l10n_ch_report.yml @@ -16,18 +16,12 @@ In order to test the PDF reports defined on a l10n_ch, we will print BVR Report - !python {model: account.invoice}: | - import netsvc, tools, os - run_str = 'cp ' + tools.config['addons_path'] + '/l10n_ch/report/ocrbb.ttf' + ' ' + '/tmp/ocrbb.ttf' - os.system(run_str) - (data, format) = netsvc.LocalService('report.l10n_ch.bvr').create(cr, uid, [ref('test_invoice_1')], {}, {}) - if tools.config['test_report_directory']: - file(os.path.join(tools.config['test_report_directory'], 'l10ch-bvr_report.'+format), 'wb+').write(data) + from tools.test_reports import try_report + try_report(cr, uid, 'report.l10n_ch.bvr', [ref('test_invoice_1')]) - In order to test the PDF reports defined on a l10n_ch, we will print a BVR Invoice Report - !python {model: account.invoice}: | - import netsvc, tools, os - (data, format) = netsvc.LocalService('report.l10n_ch.invoice.bvr').create(cr, uid, [ref('test_invoice_1')], {}, {}) - if tools.config['test_report_directory']: - file(os.path.join(tools.config['test_report_directory'], 'l10ch-bvr_invoice_report.'+format), 'wb+').write(data) + from tools.test_reports import try_report + try_report(cr, uid, 'report.l10n_ch.invoice.bvr', [ref('test_invoice_1')])