← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:py3-test-errorlog-bytes into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:py3-test-errorlog-bytes into launchpad:master.

Commit message:
Fix test_raising_non_utf8_request_param_key_bug_896959 for Python 3

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/399002

`str` was being used to mean `bytes`.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:py3-test-errorlog-bytes into launchpad:master.
diff --git a/lib/lp/services/webapp/tests/test_errorlog.py b/lib/lp/services/webapp/tests/test_errorlog.py
index ff7c4a5..b194a96 100644
--- a/lib/lp/services/webapp/tests/test_errorlog.py
+++ b/lib/lp/services/webapp/tests/test_errorlog.py
@@ -236,7 +236,7 @@ class TestErrorReportingUtility(TestCaseWithFactory):
         except ArbitraryException:
             report = utility.raising(sys.exc_info(), request)
         for key in report['req_vars'].keys():
-            if isinstance(key, str):
+            if isinstance(key, bytes):
                 key.decode('utf8')
             else:
                 self.assertIsInstance(key, six.text_type)