Merge lp:~jelmer/brz/launchpad-test-fix into lp:brz

Proposed by Jelmer Vernooij
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: 7080
Merge reported by: The Breezy Bot
Merged at revision: not available
Proposed branch: lp:~jelmer/brz/launchpad-test-fix
Merge into: lp:brz
Diff against target: 59 lines (+20/-4)
2 files modified
breezy/plugins/launchpad/test_register.py (+19/-4)
python3.passing (+1/-0)
To merge this branch: bzr merge lp:~jelmer/brz/launchpad-test-fix
Reviewer Review Type Date Requested Status
Martin Packman Approve
Review via email: mp+353687@code.launchpad.net

Description of the change

Fix Launchpad registration test on Python 3.

To post a comment you must log in.
lp:~jelmer/brz/launchpad-test-fix updated
7080. By Jelmer Vernooij on 2018-08-24

Update python3.passing.

Revision history for this message
Martin Packman (gz) wrote :

I feel like this requires a bit of an explanation on the branch over versions, but fair enough.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'breezy/plugins/launchpad/test_register.py'
--- breezy/plugins/launchpad/test_register.py 2018-06-27 21:56:53 +0000
+++ breezy/plugins/launchpad/test_register.py 2018-08-24 01:48:23 +0000
@@ -28,6 +28,7 @@
28 Transport,28 Transport,
29 )29 )
3030
31from ...sixish import PY3
31from ...tests import TestCaseWithTransport32from ...tests import TestCaseWithTransport
3233
33# local import34# local import
@@ -98,6 +99,7 @@
9899
99 # Python 2.5's xmlrpclib looks for this.100 # Python 2.5's xmlrpclib looks for this.
100 _use_datetime = False101 _use_datetime = False
102 _use_builtin_types = False
101103
102 def __init__(self, testcase):104 def __init__(self, testcase):
103 self.testcase = testcase105 self.testcase = testcase
@@ -111,10 +113,23 @@
111 raise AssertionError()113 raise AssertionError()
112 return InstrumentedXMLRPCConnection(test)114 return InstrumentedXMLRPCConnection(test)
113115
114 def send_request(self, connection, handler_path, request_body,116 if PY3:
115 verbose=None):117 def send_request(self, host, handler_path, request_body,
116 test = self.testcase118 verbose=None):
117 self.got_request = True119 self.connected_host = host
120 test = self.testcase
121 self.got_request = True
122 unpacked, method = xmlrpc_loads(request_body)
123 if None in unpacked:
124 raise AssertionError(
125 "xmlrpc result %r shouldn't contain None" % (unpacked,))
126 self.sent_params = unpacked
127 return InstrumentedXMLRPCConnection(test)
128 else:
129 def send_request(self, connection, handler_path, request_body,
130 verbose=None):
131 test = self.testcase
132 self.got_request = True
118133
119 def send_host(self, conn, host):134 def send_host(self, conn, host):
120 pass135 pass
121136
=== modified file 'python3.passing'
--- python3.passing 2018-08-23 10:19:35 +0000
+++ python3.passing 2018-08-24 01:48:23 +0000
@@ -1236,6 +1236,7 @@
1236breezy.plugins.launchpad.test_lp_service.TestURLInference.test_staging_branch_url1236breezy.plugins.launchpad.test_lp_service.TestURLInference.test_staging_branch_url
1237breezy.plugins.launchpad.test_lp_service.TestURLInference.test_staging_url1237breezy.plugins.launchpad.test_lp_service.TestURLInference.test_staging_url
1238breezy.plugins.launchpad.test_register.TestResolveLaunchpadPathRequest.test_mock_resolve_lp_url1238breezy.plugins.launchpad.test_register.TestResolveLaunchpadPathRequest.test_mock_resolve_lp_url
1239breezy.plugins.launchpad.test_register.TestResolveLaunchpadPathRequest.test_onto_transport
1239breezy.plugins.launchpad.test_register.TestResolveLaunchpadPathRequest.test_subclass_request1240breezy.plugins.launchpad.test_register.TestResolveLaunchpadPathRequest.test_subclass_request
1240breezy.plugins.netrc_credential_store.tests.test_netrc.TestNetrcCSNoNetrc.test_home_netrc_does_not_exist1241breezy.plugins.netrc_credential_store.tests.test_netrc.TestNetrcCSNoNetrc.test_home_netrc_does_not_exist
1241breezy.plugins.netrc_credential_store.tests.test_netrc.TestNetrcCS.test_default_password1242breezy.plugins.netrc_credential_store.tests.test_netrc.TestNetrcCS.test_default_password

Subscribers

People subscribed via source and target branches