From 5b8e4a370ea807df61426e6418ed959891681dff Mon Sep 17 00:00:00 2001 From: Yannick Tivisse Date: Tue, 7 Nov 2017 10:31:51 +0100 Subject: [PATCH] [IMP] hr_recruitment_survey: Convert yml test into python --- addons/hr_recruitment_survey/__manifest__.py | 1 - .../test/recruitment_process.yml | 5 ----- addons/hr_recruitment_survey/tests/__init__.py | 4 ++++ .../hr_recruitment_survey/tests/test_print_survey.py | 12 ++++++++++++ 4 files changed, 16 insertions(+), 6 deletions(-) delete mode 100644 addons/hr_recruitment_survey/test/recruitment_process.yml create mode 100644 addons/hr_recruitment_survey/tests/__init__.py create mode 100644 addons/hr_recruitment_survey/tests/test_print_survey.py diff --git a/addons/hr_recruitment_survey/__manifest__.py b/addons/hr_recruitment_survey/__manifest__.py index 2b6c9c13939..2daac345dd4 100644 --- a/addons/hr_recruitment_survey/__manifest__.py +++ b/addons/hr_recruitment_survey/__manifest__.py @@ -21,6 +21,5 @@ 'demo': [ 'data/hr_job_demo.xml', ], - 'test': ['test/recruitment_process.yml'], 'auto_install': False, } diff --git a/addons/hr_recruitment_survey/test/recruitment_process.yml b/addons/hr_recruitment_survey/test/recruitment_process.yml deleted file mode 100644 index 48a445d815c..00000000000 --- a/addons/hr_recruitment_survey/test/recruitment_process.yml +++ /dev/null @@ -1,5 +0,0 @@ -- - I print Applicant fill up the interview question -- - !python {model: hr.applicant, id: hr_recruitment.hr_case_programmer}: | - self.action_print_survey() diff --git a/addons/hr_recruitment_survey/tests/__init__.py b/addons/hr_recruitment_survey/tests/__init__.py new file mode 100644 index 00000000000..d7aadb8982e --- /dev/null +++ b/addons/hr_recruitment_survey/tests/__init__.py @@ -0,0 +1,4 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. + +from . import test_print_survey diff --git a/addons/hr_recruitment_survey/tests/test_print_survey.py b/addons/hr_recruitment_survey/tests/test_print_survey.py new file mode 100644 index 00000000000..816f7be7116 --- /dev/null +++ b/addons/hr_recruitment_survey/tests/test_print_survey.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. + +from odoo.tests import common + + +class TestDeferredRevenue(common.TransactionCase): + + def test_print_survey(self): + '''I print the survey to fill up the interview question''' + + self.env.ref('hr_recruitment.hr_case_programmer').action_print_survey()