Mathias Markl 7 years ago
parent
commit
59f3f5751d
  1. 24
      muk_web_preview_mail/tests/test_mail_parse.py

24
muk_web_preview_mail/tests/test_mail_parse.py

@ -58,17 +58,19 @@ class MailParseTestCase(common.HttpCase):
def test_parse_mail(self): def test_parse_mail(self):
self.authenticate('admin', 'admin') 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) _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))

Loading…
Cancel
Save