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 7397efa  Don't use get_bytes; it does not return all
7397efa is described below

commit 7397efa3cddb70977cdcf59e952f300cd1de815b
Author: Sebb <[email protected]>
AuthorDate: Fri Sep 4 23:19:33 2020 +0100

    Don't use get_bytes; it does not return all
---
 tests/test-generators.py | 4 +++-
 tests/test-parsing.py    | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/tests/test-generators.py b/tests/test-generators.py
index 8a70bb7..b56d991 100755
--- a/tests/test-generators.py
+++ b/tests/test-generators.py
@@ -18,7 +18,9 @@ fake_args = collections.namedtuple('fakeargs', ['verbose', 
'ibody'])(False, None
 # get raw message, allowing for mboxo translation
 def _raw(args, mbox, key):
     if args.nomboxo: # No need to filter the data
-        message_raw = mbox.get_bytes(key, True)
+        file=mbox.get_file(key, True)
+        message_raw=file.read()
+        file.close()
     else:
         from mboxo_patch import MboxoReader
         file=mbox.get_file(key, True)
diff --git a/tests/test-parsing.py b/tests/test-parsing.py
index b95a46c..e9c87ac 100755
--- a/tests/test-parsing.py
+++ b/tests/test-parsing.py
@@ -18,7 +18,9 @@ fake_args = collections.namedtuple('fakeargs', ['verbose', 
'ibody'])(False, None
 # get raw message, allowing for mboxo translation
 def _raw(args, mbox, key):
     if args.nomboxo: # No need to filter the data
-        message_raw = mbox.get_bytes(key, True)
+        file=mbox.get_file(key, True)
+        message_raw=file.read()
+        file.close()
     else:
         from mboxo_patch import MboxoReader
         file=mbox.get_file(key, True)

Reply via email to