You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by se...@apache.org on 2020/09/08 22:25:18 UTC
[incubator-ponymail-unit-tests] branch master updated: Adjust for
recent api changes
This is an automated email from the ASF dual-hosted git repository.
sebb 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 1a332c8 Adjust for recent api changes
1a332c8 is described below
commit 1a332c8305f6f356316f16a57c2d995a8e3e59ea
Author: Sebb <se...@apache.org>
AuthorDate: Tue Sep 8 23:25:01 2020 +0100
Adjust for recent api changes
---
tests/interfacer.py | 34 +++++++++++++++++++++++++++-------
1 file changed, 27 insertions(+), 7 deletions(-)
diff --git a/tests/interfacer.py b/tests/interfacer.py
index bbcb88b..33228f5 100644
--- a/tests/interfacer.py
+++ b/tests/interfacer.py
@@ -2,6 +2,26 @@
"""
This is a wrapper to standardise the API for different versions
+
+Foal:
+ def __init__(
+ self, generator=None, parse_html=False, ignore_body=None, verbose=False
+ ):
+
+ def compute_updates(self, lid, private, msg, raw_msg):
+
+Ponymail 12:
+ def __init__(
+ self, generator=None, parse_html=False, ignore_body=None, dump_dir=None, verbose=False, skipff=False
+ ):
+
+ def compute_updates(self, lid, private, msg):
+
+0.11, 0.10:
+ def __init__(self, parseHTML=False):
+
+ def compute_updates(self, lid, private, msg):
+
"""
import sys
@@ -17,16 +37,16 @@ class Archiver(object):
if hasattr(args, 'generator'):
archiver_.archiver_generator = args.generator
self.archie = archiver_.Archiver(parseHTML=args.parse_html)
- # Foal
- elif 'ignore_body' in self.expected_archie_parameters:
+ # Ponymail 12+
+ elif 'skipff' in self.expected_archie_parameters:
+ self.archie = archiver_.Archiver(generator=getattr(args, 'generator', None),
+ parse_html=args.parse_html,
+ ignore_body=None, # To be provided later
+ skipff=True)
+ else: # Foal
self.archie = archiver_.Archiver(generator=getattr(args, 'generator', None),
parse_html=args.parse_html,
ignore_body=None) # To be provided later
- else: # 0.12+
- if hasattr(args, 'generator'):
- self.archie = archiver_.Archiver(generator=args.generator, parse_html=args.parse_html)
- else:
- self.archie = archiver_.Archiver(parse_html=args.parse_html)
if 'raw_msg' in self.expected_compute_parameters:
self.compute = self._compute_foal