[REM] Outdated commented code

bzr revid: rim@openerp.com-20140127082449-j2kv70x9watq7r0j
This commit is contained in:
Richard Mathot (OpenERP)
2014-01-27 09:24:49 +01:00
parent 8e11708bd1
commit efd85595a5
+4 -93
View File
@@ -19,100 +19,11 @@
#
##############################################################################
from openerp.osv.orm import except_orm
from openerp.tools import mute_logger
from time import time
#from openerp.osv.orm import except_orm
#from openerp.tools import mute_logger
class test_survey():
# def setUp(self):
# cr, uid = self.cr, self.uid
# # Usefull models
# self.ir_model = self.registry('ir.model')
# self.ir_model_data = self.registry('ir.model.data')
# self.obj_survey = self.registry('survey.survey')
# self.obj_survey_response = self.registry('survey.response')
# self.obj_survey_question_wiz = self.registry('survey.question.wiz')
# self.obj_survey_print = self.registry('survey.print')
# self.survey_id = self.obj_survey.create(cr, uid, {
# 'title': 'Initial Partner Feedback',
# 'max_response_limit': 20,
# 'type': ref("survey_type2"),
# 'state': 'draft',
# 'authenticate': 0,
# 'date_open': time.strftime('%Y-%m-%d %H:%M:%S')
# })
# self.survey_browse = self.obj_survey.browse(cr, uid, self.survey_id, context)
#@mute_logger('openerp.addons.base.ir.ir_model', 'openerp.osv.orm')
# def test_00_survey_public(self):
# cr, uid = self.cr, self.uid
# # In order to check the survey module in OpenERP I use the survey "Initial Partner Feedback".
# # I set the survey in Open state.
# self.obj_survey.survey_open(cr, uid, [self.survey_id], context)
# # I check state of survey is open or not.
# self.assertEqual(self.survey_browse.state, 'open', 'Survey should be in open state')
# # I check that the survey is reopened or not.
# self.obj_survey.survey_cancel(cr, uid, [self.survey_id], context)
# self.obj_survey.survey_open(cr, uid, [self.survey_id], context)
# self.assertEqual(self.survey_browse.state, 'open', 'Survey should be in open state again')
# # I set the state of the survey open.
# self.obj_survey.survey_open(cr, uid, [self.survey_id], context)
# # In order to print the survey I click on Print.
# id = self.obj_survey_print.create(cr, uid, {'survey_ids': [(6, 0, [self.survey_id])]})
# self.obj_survey_print.action_next(cr, uid, [id], context)
# # In order to answer the survey I click on "Answer a Survey" with a public token.
# ctx = {}
# ctx.update({'survey_id': self.survey_id, 'survey_token': self.survey_browse.token})
# fields_view = self.obj_survey_question_wiz.fields_view_get(self, cr, uid, view_id=None, view_type='form', context=ctx)
# id = self.obj_survey_question_wiz.create(cr, uid, {}, ctx)
# self.obj_survey_question_wiz.action_next(cr, uid, [id], ctx)
# # I give the answer of the first and second page of the survey.
# #ctx = {'active_model':'survey.survey', 'active_id': self.survey_id, 'active_ids': [self.survey_id]}
# self.obj_survey_question_wiz.fields_view_get(cr, uid, ref("survey.view_survey_question_message"),"form", context=ctx)
# values = self.obj_survey_question_wiz.default_get(cr, uid, ['name'], ctx)
# id = self.obj_survey_question_wiz.create(cr, uid, {str(ref("survey_initial_question_company_name")) +"_single" :'Tiny' , str(ref("survey_initial_question_company_size")) + "_selection" : int(ref("survey.survey_initial_question_company_size_51")), }, context)
# self.obj_survey_question_wiz.action_next(cr, uid, [id], context)
# id = self.obj_survey_question_wiz.create(cr, uid, {str(ref("survey_initial_question_contract_customers")) + "_selection" : int(ref("survey_initial_answer_sometimes")), str(ref("survey_initial_question_sell_to_your_customers")) + "_selection" : int(ref("survey_initial_answer_maintenance_contract")), }, context)
# self.obj_survey_question_wiz.action_next(cr, uid, [id], context)
# # I edit questions of the survey as per requirement.
# id = self.obj_survey_name_wiz.create(cr, uid, {'survey_id': self.survey_id})
# ctx.update({'question_id': ref('survey_initial_question_company_name'), 'page_number': -1, 'sur_name_id': id})
# self.obj_survey_question_wiz.action_edit_question(cr, uid, [ref('survey_initial_question_company_name')], context=ctx)
# self.obj_survey_question_wiz.action_delete_question(cr, uid, [ref('survey_initial_question_company_name')], context=ctx)
# self.obj_survey_question_wiz.action_new_question(cr, uid, [], context=ctx)
# # I edit Page of the survey as per requirement.
# id = self.obj_survey_name_wiz.create(cr, uid, {'survey_id': self.survey_id})
# ctx.update({'page_id': ref('survey_initial_page_Contracts'), 'sur_name_id': id})
# self.obj_survey_question_wiz.action_edit_page(cr, uid, [ref('survey_initial_page_Contracts')], context=ctx)
# self.obj_survey_question_wiz.action_delete_page(cr, uid, [ref('survey_initial_page_Contracts')], context=ctx)
# self.obj_survey_question_wiz.action_new_page(cr, uid, [], context=ctx)
# # In order to send invitation to the users I click on "Send Invitation" wizard.
# # I set the survey in Cancel state.
# self.obj_survey.survey_cancel(cr, uid, [self.survey_id], context)
# # I check state of survey is cancel or not.
# self.assertEqual(self.survey_browse.state, 'cancel', 'Survey should be in cancel state')
# # I set the survey in close state.
# self.obj_survey.survey_close(cr, uid, [self.survey_id], context)
# # I check state of Survey is close or not.
# self.assertEqual(self.survey_browse.state, 'close', 'Survey should be in cancel state')
# # sur_question = self.on_change_type(cr, uid, [ref("survey_Initial_partner_feedback")], 'multiple_textboxes_diff_type')
pass
# vim: exp and tab: smartindent: tabstop=4: softtabstop=4: shiftwidth=4: