|
@ -31,6 +31,8 @@ from odoo.tests import common |
|
|
|
|
|
|
|
|
from odoo.addons.muk_web_preview_mail.controllers import main |
|
|
from odoo.addons.muk_web_preview_mail.controllers import main |
|
|
|
|
|
|
|
|
|
|
|
from requests import Request |
|
|
|
|
|
|
|
|
_path = os.path.dirname(os.path.dirname(__file__)) |
|
|
_path = os.path.dirname(os.path.dirname(__file__)) |
|
|
_logger = logging.getLogger(__name__) |
|
|
_logger = logging.getLogger(__name__) |
|
|
|
|
|
|
|
@ -58,9 +60,13 @@ class MailParseTestCase(common.HttpCase): |
|
|
_logger.info(self.url_open('/')) |
|
|
_logger.info(self.url_open('/')) |
|
|
_logger.info(self.url_open('/').headers) |
|
|
_logger.info(self.url_open('/').headers) |
|
|
_logger.info(self.url_open('/').content) |
|
|
_logger.info(self.url_open('/').content) |
|
|
url = "/web/preview/converter/mail?url=/web/content/{}?download=true".format( |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
params = {'url': "/web/content/{}?download=true".format( |
|
|
self.sample_mail_attachment.id |
|
|
self.sample_mail_attachment.id |
|
|
) |
|
|
|
|
|
|
|
|
)} |
|
|
|
|
|
request = Request('GET', '/web/preview/converter/mail', params=params).prepare() |
|
|
|
|
|
url = request.url |
|
|
|
|
|
|
|
|
_logger.info(url) |
|
|
_logger.info(url) |
|
|
self.assertTrue(self.url_open(url)) |
|
|
self.assertTrue(self.url_open(url)) |
|
|
_logger.info(self.url_open(url)) |
|
|
_logger.info(self.url_open(url)) |
|
|