launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #25998
[Merge] ~cjwatson/launchpad:py3-bugzilla-trac-cookies into launchpad:master
Colin Watson has proposed merging ~cjwatson/launchpad:py3-bugzilla-trac-cookies into launchpad:master.
Commit message:
Fix setting of Bugzilla/Trac cookies in tests
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/396202
Python 3 doesn't let us clobber the auth_cookie property. Use the setCookie method instead.
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:py3-bugzilla-trac-cookies into launchpad:master.
diff --git a/lib/lp/bugs/tests/bugzilla-api-xmlrpc-transport.txt b/lib/lp/bugs/tests/bugzilla-api-xmlrpc-transport.txt
index c2c0c45..10b00b1 100644
--- a/lib/lp/bugs/tests/bugzilla-api-xmlrpc-transport.txt
+++ b/lib/lp/bugs/tests/bugzilla-api-xmlrpc-transport.txt
@@ -462,7 +462,7 @@ Bug.add_comment() will return the integer comment ID of the new comment
on the remote server.
>>> comment = "I'm supposed to write something apposite here."
- >>> bugzilla_transport.auth_cookie = 'open sesame'
+ >>> bugzilla_transport.setCookie('Bugzilla_logincookie=open sesame')
>>> return_dict = server.Bug.add_comment({'id': 1, 'comment': comment})
>>> return_dict
{'id': 7}
diff --git a/lib/lp/bugs/tests/bugzilla-xmlrpc-transport.txt b/lib/lp/bugs/tests/bugzilla-xmlrpc-transport.txt
index 078bad7..76490f3 100644
--- a/lib/lp/bugs/tests/bugzilla-xmlrpc-transport.txt
+++ b/lib/lp/bugs/tests/bugzilla-xmlrpc-transport.txt
@@ -447,7 +447,7 @@ Launchpad.add_comment() will return the integer comment ID of the new comment
on the remote server.
>>> comment = "Didn't we have a lovely time the day we went to Bangor?"
- >>> bugzilla_transport.auth_cookie = 'open sesame'
+ >>> bugzilla_transport.setCookie('Bugzilla_logincookie=open sesame')
>>> return_dict = server.Launchpad.add_comment(
... {'id': 1, 'comment': comment})
>>> print(return_dict['comment_id'])
@@ -494,7 +494,7 @@ Launchpad.set_link() requires authentication.
Launchpad.set_link() will return 0 if no Launchpad bug has ever linked
to the remote bug.
- >>> bugzilla_transport.auth_cookie = "here we go again"
+ >>> bugzilla_transport.setCookie("Bugzilla_logincookie=here we go again")
>>> result = server.Launchpad.set_link({'id': 1, 'launchpad_id': 10})
>>> print(result['launchpad_id'])
0
diff --git a/lib/lp/bugs/tests/trac-xmlrpc-transport.txt b/lib/lp/bugs/tests/trac-xmlrpc-transport.txt
index baa4880..0a4dfeb 100644
--- a/lib/lp/bugs/tests/trac-xmlrpc-transport.txt
+++ b/lib/lp/bugs/tests/trac-xmlrpc-transport.txt
@@ -22,7 +22,7 @@ All the methods need an authentication cookie to be sent.
This test transport doesn't validate the cookie, it just ensures that
some cookie is set.
- >>> trac_transport.auth_cookie = 'auth-cookie'
+ >>> trac_transport.setCookie('trac_auth=auth_cookie')
== launchpad.bugtracker_version() ==