|
|
@ -58,17 +58,19 @@ class MailParseTestCase(common.HttpCase): |
|
|
|
|
|
|
|
def test_parse_mail(self): |
|
|
|
self.authenticate('admin', 'admin') |
|
|
|
url = "/web/preview/converter/mail" |
|
|
|
params = {'url': "/web/content/{}?download=true".format( |
|
|
|
self.sample_mail_attachment.id |
|
|
|
)} |
|
|
|
url_parts = list(urlparse(url)) |
|
|
|
query = dict(parse_qsl(url_parts[4])) |
|
|
|
query.update(params) |
|
|
|
url_parts[4] = urlencode(query) |
|
|
|
|
|
|
|
_logger.info(url_parts) |
|
|
|
url = urlunparse(url_parts) |
|
|
|
url = "/web/preview/converter/mail?url=/web/content/{}".format( |
|
|
|
self.sample_mail_attachment.id |
|
|
|
) |
|
|
|
# params = {'url': "/web/content/{}".format( |
|
|
|
# self.sample_mail_attachment.id |
|
|
|
# )} |
|
|
|
# url_parts = list(urlparse(url)) |
|
|
|
# query = dict(parse_qsl(url_parts[4])) |
|
|
|
# query.update(params) |
|
|
|
# url_parts[4] = urlencode(query) |
|
|
|
# |
|
|
|
# _logger.info(url_parts) |
|
|
|
# url = urlunparse(url_parts) |
|
|
|
_logger.info(url) |
|
|
|
self.assertTrue(self.url_open(url)) |
|
|
|
_logger.info(self.url_open(url)) |
|
|
|