You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by hu...@apache.org on 2020/09/06 07:09:00 UTC
[incubator-ponymail-unit-tests] branch master updated: Add a
special flag for detecting foal's storage of raw html for html-only emails
with no html2text
This is an automated email from the ASF dual-hosted git repository.
humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-unit-tests.git
The following commit(s) were added to refs/heads/master by this push:
new a8712d6 Add a special flag for detecting foal's storage of raw html for html-only emails with no html2text
new 4357e78 Merge branch 'master' of github.com:apache/incubator-ponymail-unit-tests
a8712d6 is described below
commit a8712d677bf13d254c6a7cc4d35447ead83b1c56
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Sun Sep 6 09:07:42 2020 +0200
Add a special flag for detecting foal's storage of raw html for html-only emails with no html2text
---
tests/test-parsing.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/test-parsing.py b/tests/test-parsing.py
index e9c87ac..7cf8b07 100755
--- a/tests/test-parsing.py
+++ b/tests/test-parsing.py
@@ -110,7 +110,8 @@ def run_tests(args):
json = archie.compute_updates(fake_args, lid, False, message, message_raw)
body_sha3_256 = None
if json and json.get('body') is not None:
- body_sha3_256 = hashlib.sha3_256(json['body'].encode('utf-8')).hexdigest()
+ if not json.get('html_source_only'):
+ body_sha3_256 = hashlib.sha3_256(json['body'].encode('utf-8')).hexdigest()
if body_sha3_256 != test['body_sha3_256']:
errors += 1
sys.stderr.write("""[FAIL] parsing index %2u: Expected: %s Got: %s\n""" %