Merge ~cjwatson/launchpad:py3-testregistration-bytesio into launchpad:master

Proposed by Colin Watson
Status: Merged
Approved by: Colin Watson
Approved revision: ace1ee34a7f188a5926dd57f4615382fc691f577
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~cjwatson/launchpad:py3-testregistration-bytesio
Merge into: launchpad:master
Diff against target: 22 lines (+2/-2)
1 file modified
lib/lp/translations/tests/test_publisher.py (+2/-2)
Reviewer Review Type Date Requested Status
Ioana Lasc (community) Approve
Review via email: mp+392387@code.launchpad.net

Commit message

Port TestRegistration to io.BytesIO

To post a comment you must log in.
Revision history for this message
Ioana Lasc (ilasc) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/lib/lp/translations/tests/test_publisher.py b/lib/lp/translations/tests/test_publisher.py
2index 576961a..235f8e4 100644
3--- a/lib/lp/translations/tests/test_publisher.py
4+++ b/lib/lp/translations/tests/test_publisher.py
5@@ -5,7 +5,7 @@
6
7 __metaclass__ = type
8
9-import StringIO
10+import io
11
12 from lp.layers import WebServiceLayer
13 from lp.services.config import config
14@@ -44,7 +44,7 @@ class TestRegistration(TestCase):
15 def test_response_should_vary_based_on_language(self):
16 # Responses to requests to translations pages have the 'Vary' header
17 # set to include Accept-Language.
18- request = TranslationsBrowserRequest(StringIO.StringIO(''), {})
19+ request = TranslationsBrowserRequest(io.BytesIO(), {})
20 self.assertEqual(
21 request.response.getHeader('Vary'),
22 'Cookie, Authorization, Accept-Language')

Subscribers

People subscribed via source and target branches

to status/vote changes: