diff options
| author | vbh-odoo <vbh@odoo.com> | 2015-08-06 16:29:42 +0530 |
|---|---|---|
| committer | David Monjoie <dmo@odoo.com> | 2016-06-30 14:41:25 +0200 |
| commit | 42b498dc6f6bfd1d375c854d8b415295fbc84e65 (patch) | |
| tree | f5593b4a11e0a9d8eb75d2488d638b3b811e84c9 /addons/project_issue/tests/test_subscribe_issue.py | |
| parent | ccfea6b2f614e55c14d8dd3c2ade78d5b91906ec (diff) | |
[MIG] project_issue: converted test cases from yml to python
Diffstat (limited to 'addons/project_issue/tests/test_subscribe_issue.py')
| -rw-r--r-- | addons/project_issue/tests/test_subscribe_issue.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/addons/project_issue/tests/test_subscribe_issue.py b/addons/project_issue/tests/test_subscribe_issue.py new file mode 100644 index 00000000000..2577033bbf0 --- /dev/null +++ b/addons/project_issue/tests/test_subscribe_issue.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- + +from odoo.addons.project_issue.tests.common import TestIssueUsers +from odoo.modules import module + + +class TestSubscribeIssue(TestIssueUsers): + + def test_subscribe_issues(self): + # In Order to test process of Issue in Odoo, Customer send the issue by email. + request_file = open(module.get_module_resource('project_issue', 'tests', 'issue.eml'), 'rb') + request_message = request_file.read() + self.env["mail.thread"].message_process('project.issue', request_message) + + # After getting the mail, Check details of new issue of that customer. + issue = self.ProjectIssue.search([('email_from', '=', 'Robert Adersen <Robert_Adersen@yahoo.com>')], limit=1) + self.assertEquals(len(issue), 1, "Issue is not created after getting request") + self.assertFalse(issue.partner_id, "Customer should be a new") + self.assertEquals(issue.name, "Error in the account module", "Subject does not match") |
