launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #26452
[Merge] ~cjwatson/launchpad:py3-test-decode-librarian-content into launchpad:master
Colin Watson has proposed merging ~cjwatson/launchpad:py3-test-decode-librarian-content into launchpad:master.
Commit message:
Decode librarian content in tests before printing it (take 2)
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/398784
Similar to https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/397706, but I missed a few spots.
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:py3-test-decode-librarian-content into launchpad:master.
diff --git a/lib/lp/bugs/tests/bugs-emailinterface.txt b/lib/lp/bugs/tests/bugs-emailinterface.txt
index e59530a..9927229 100644
--- a/lib/lp/bugs/tests/bugs-emailinterface.txt
+++ b/lib/lp/bugs/tests/bugs-emailinterface.txt
@@ -2403,7 +2403,7 @@ criteria described below).
... print(lib.__class__.__name__, lib.filename, lib.mimetype,
... end=" ")
... print(attachment.type.name)
- ... print(lib.read())
+ ... print(lib.read().decode('UTF-8'))
>>> login('test@xxxxxxxxxxxxx')
>>> submit_mail = b"""From: Sample Person <test@xxxxxxxxxxxxx>
... To: new@xxxxxxxxxxxxxxxxxx
diff --git a/lib/lp/registry/tests/test_distributionmirror_prober.py b/lib/lp/registry/tests/test_distributionmirror_prober.py
index 3b169d8..052d98a 100644
--- a/lib/lp/registry/tests/test_distributionmirror_prober.py
+++ b/lib/lp/registry/tests/test_distributionmirror_prober.py
@@ -1246,7 +1246,7 @@ class TestDistroMirrorProberFunctional(TestCaseWithFactory):
with admin_logged_in():
record = removeSecurityProxy(mirror.last_probe_record)
- log_lines = record.log_file.read()
+ log_lines = record.log_file.read().decode("UTF-8")
self.assertEqual(4, len(log_lines.split("\n")))
self.assertIn(
"Found all ISO images for series The Hoary Hedgehog Release "
@@ -1284,7 +1284,7 @@ class TestDistroMirrorProberFunctional(TestCaseWithFactory):
with admin_logged_in():
record = removeSecurityProxy(mirror.last_probe_record)
- log_lines = record.log_file.read()
+ log_lines = record.log_file.read().decode("UTF-8")
# Make sure that prober output seems reasonable.
self.assertEqual(85, len(log_lines.split("\n")))