2 In Order to test process of Issue in OpenERP, Customer send the issue by email.
4 !python {model: mail.thread}: |
5 request_file = open(openerp.modules.module.get_module_resource('project_issue','test', 'issue.eml'),'rb')
6 request_message = request_file.read()
7 self.message_process(cr, uid, 'project.issue', request_message)
9 After getting the mail, I check details of new issue of that customer.
11 !python {model: project.issue}: |
12 issue_ids = self.search(cr, uid, [('email_from', '=', 'Robert Adersen <Robert_Adersen@yahoo.com>')])
13 assert issue_ids and len(issue_ids), "issue is not created after getting request"
14 issue = self.browse(cr, uid, issue_ids[0], context=context)
15 assert not issue.partner_id, "Customer should be a new"
16 assert issue.name == "Error in the account module", "Subject does not match"