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