launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #23648
[Merge] lp:~cjwatson/launchpad/test-domain-prep into lp:launchpad
Colin Watson has proposed merging lp:~cjwatson/launchpad/test-domain-prep into lp:launchpad.
Commit message:
Prepare some doctests for change to launchpad.test domain.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/test-domain-prep/+merge/367451
Some doctests were sensitive to the exact length of URLs, which will change shortly when we rename from launchpad.dev to launchpad.test.
--
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/test-domain-prep into lp:launchpad.
=== modified file 'lib/lp/code/stories/branches/xx-branch-edit.txt'
--- lib/lp/code/stories/branches/xx-branch-edit.txt 2018-05-13 10:35:52 +0000
+++ lib/lp/code/stories/branches/xx-branch-edit.txt 2019-05-15 08:02:45 +0000
@@ -276,11 +276,11 @@
>>> len(stub.test_emails)
1
- >>> print(stub.test_emails[0][2])
- Content-Type: ...
- ...
+ >>> from lp.testing.mail_helpers import print_emails
+
+ >>> print_emails(decode=True)
+ From: No Privileges Person <no-priv@xxxxxxxxxxxxx>
To: Sample Person <test@xxxxxxxxxxxxx>
- From: No Privileges Person <no-priv@xxxxxxxxxxxxx>
Subject: [Branch ~name12/foogoo/foogoo-svn]
...
New whiteboard value
@@ -290,9 +290,10 @@
http://code.launchpad.dev/~name12/foogoo/foogoo-svn
<BLANKLINE>
You are subscribed to branch lp://dev/~name12/foogoo/foogoo-svn.
- To unsubscribe from this branch go to http://code.l.../~name12/foo=
- goo/foogoo-svn/+edit-subscription
+ To unsubscribe from this branch go to
+ http://code.l.../~name12/foogoo/foogoo-svn/+edit-subscription
<BLANKLINE>
+ ----------------------------------------
Changing the branch owner
=== modified file 'lib/lp/soyuz/doc/build-failedtoupload-workflow.txt'
--- lib/lp/soyuz/doc/build-failedtoupload-workflow.txt 2019-01-05 09:21:54 +0000
+++ lib/lp/soyuz/doc/build-failedtoupload-workflow.txt 2019-05-15 08:02:45 +0000
@@ -78,7 +78,7 @@
>>> build_notification['X-Creator-Recipient']
'mark@xxxxxxxxxxx'
- >>> notification_body = build_notification.get_payload()
+ >>> notification_body = build_notification.get_payload(decode=True)
>>> print(notification_body) #doctest: -NORMALIZE_WHITESPACE
<BLANKLINE>
* Source Package: cdrkit
@@ -88,8 +88,7 @@
* Component: main
* State: Failed to upload
* Duration: 1 minute
- * Build Log: http://launchpad.dev/ubuntu/+source/cdrkit/1.0/+build/22/+fil=
- es/netapplet-1.0.0.tar.gz
+ * Build Log: http://launchpad.dev/ubuntu/+source/cdrkit/1.0/+build/22/+files/netapplet-1.0.0.tar.gz
* Builder: http://launchpad.dev/builders/bob
* Source: http://launchpad.dev/ubuntu/+source/cdrkit/1.0
<BLANKLINE>
@@ -100,8 +99,7 @@
contact us by asking a question on Launchpad
(https://answers.launchpad.net/launchpad/+addquestion).
<BLANKLINE>
- -- =
- <BLANKLINE>
+ --
i386 build of cdrkit 1.0 in ubuntu breezy-autotest RELEASE
http://launchpad.dev/ubuntu/+source/cdrkit/1.0/+build/22
<BLANKLINE>
=== modified file 'lib/lp/testing/mail_helpers.py'
--- lib/lp/testing/mail_helpers.py 2015-09-14 14:12:58 +0000
+++ lib/lp/testing/mail_helpers.py 2019-05-15 08:02:45 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Canonical Ltd. This software is licensed under the
+# Copyright 2009-2019 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Helper functions dealing with emails in tests.
@@ -60,7 +60,8 @@
def print_emails(include_reply_to=False, group_similar=False,
include_rationale=False, include_for=False,
- notifications=None, include_notification_type=False):
+ notifications=None, include_notification_type=False,
+ decode=False):
"""Pop all messages from stub.test_emails and print them with
their recipients.
@@ -80,6 +81,7 @@
the stack.
:param include_notification_type: Include the
X-Launchpad-Notification-Type header.
+ :param decode: Decode message payloads if True.
"""
distinct_bodies = {}
if notifications is None:
@@ -88,7 +90,7 @@
recipients = set(
recipient.strip()
for recipient in message['To'].split(','))
- body = message.get_payload()
+ body = message.get_payload(decode=decode)
if group_similar:
# Strip the first line as it's different for each recipient.
body = body[body.find('\n') + 1:]
=== modified file 'lib/lp/translations/doc/poexport-queue.txt'
--- lib/lp/translations/doc/poexport-queue.txt 2018-06-02 13:37:18 +0000
+++ lib/lp/translations/doc/poexport-queue.txt 2019-05-15 08:02:45 +0000
@@ -74,12 +74,12 @@
One is for the user with the error notification.
- >>> print_emails(notifications=[carlos_email])
+ >>> print_emails(notifications=[carlos_email], decode=True)
From: ...
To: carlos@xxxxxxxxxxxxx
Subject: Launchpad translation download: Evolution trunk -
evolution-2.2 template
- Hello Carlos Perell=C3=B3 Mar=C3=ADn,
+ Hello Carlos Perelló Marín,
<BLANKLINE>
Launchpad encountered problems exporting the files you requested.
The Launchpad Translations team has been notified of this problem.
@@ -87,10 +87,9 @@
<BLANKLINE>
If you want to retry your request, you can do so at
<BLANKLINE>
- http://translations.launchpad.../trunk/+pots/evolution-2.2/+ex=
- port.
+ http://translations.launchpad.../trunk/+pots/evolution-2.2/+export.
<BLANKLINE>
- -- =
+ --
Automatic message from Launchpad.net.
<BLANKLINE>
----------------------------------------
@@ -98,7 +97,7 @@
And the other to the admins. This one lists the files that were being
exported as context to help tracking down any bugs.
- >>> print_emails(notifications=[admin_email])
+ >>> print_emails(notifications=[admin_email], decode=True)
From: ...
To: launchpad-error-reports@xxxxxxxxxxxxxxxxxxx
Subject: Launchpad translation download errors: Evolution trunk -
@@ -106,10 +105,9 @@
Hello Launchpad administrators,
<BLANKLINE>
Launchpad encountered problems exporting translation files
- requested by Carlos Perell=C3=B3 Mar=C3=ADn (carlos) at
+ requested by Carlos Perelló Marín (carlos) at
<BLANKLINE>
- http://translations.launchpad.../trunk/+pots/evolution-2.2/+ex=
- port
+ http://translations.launchpad.../trunk/+pots/evolution-2.2/+export
<BLANKLINE>
This means we have a bug in Launchpad that needs to be fixed
before this export can proceed. Here is the error we got:
@@ -123,7 +121,7 @@
* evolution-2.2 in Evolution trunk
* Spanish (es) translation of evolution-2.2 in Evolution trunk
<BLANKLINE>
- -- =
+ --
Automatic message from Launchpad.net.
<BLANKLINE>
----------------------------------------
@@ -153,12 +151,12 @@
The user's notification looks no different from that for an ordinary
error.
- >>> print_emails(notifications=[carlos_email])
+ >>> print_emails(notifications=[carlos_email], decode=True)
From: ...
To: carlos@xxxxxxxxxxxxx
Subject: Launchpad translation download: Evolution trunk -
evolution-2.2 template
- Hello Carlos Perell=C3=B3 Mar=C3=ADn,
+ Hello Carlos Perelló Marín,
<BLANKLINE>
Launchpad encountered problems exporting the files you requested.
The Launchpad Translations team has been notified of this problem.
@@ -166,10 +164,9 @@
<BLANKLINE>
If you want to retry your request, you can do so at
<BLANKLINE>
- http://translations.launchpad.../trunk/+pots/evolution-2.2/+ex=
- port.
+ http://translations.launchpad.../trunk/+pots/evolution-2.2/+export.
<BLANKLINE>
- -- =
+ --
Automatic message from Launchpad.net.
<BLANKLINE>
----------------------------------------
@@ -177,7 +174,7 @@
The one for the administrators, however, does not include the
unprintable exception text.
- >>> print_emails(notifications=[admin_email])
+ >>> print_emails(notifications=[admin_email], decode=True)
From: ...
To: launchpad-error-reports@xxxxxxxxxxxxxxxxxxx
Subject: Launchpad translation download errors: Evolution trunk -
@@ -188,14 +185,13 @@
failure during a translation export requested by Carlos ...
(carlos) at
<BLANKLINE>
- http://translations.launchpad.../trunk/+pots/evolution-2.2/+ex=
- port
+ http://translations.launchpad.../trunk/+pots/evolution-2.2/+export
<BLANKLINE>
Failed export request included:
* evolution-2.2 in Evolution trunk
* Spanish (es) translation of evolution-2.2 in Evolution trunk
<BLANKLINE>
- -- =
+ --
Automatic message from Launchpad.net.
<BLANKLINE>
----------------------------------------
@@ -224,12 +220,12 @@
>>> len(test_emails)
1
- >>> print_emails(notifications=test_emails)
+ >>> print_emails(notifications=test_emails, decode=True)
From: ...
To: carlos@xxxxxxxxxxxxx
Subject: Launchpad translation download: Evolution trunk -
evolution-2.2 template
- Hello Carlos Perell=C3=B3 Mar=C3=ADn,
+ Hello Carlos Perelló Marín,
<BLANKLINE>
The translation files you requested from Launchpad are ready for
download from the following location:
@@ -240,10 +236,9 @@
download these translations again, you will have to request
them again at
<BLANKLINE>
- http://translations.launchpad.../trunk/+pots/evolution-2.2/+ex=
- port
+ http://translations.launchpad.../trunk/+pots/evolution-2.2/+export
<BLANKLINE>
- -- =
+ --
Automatic message from Launchpad.net.
<BLANKLINE>
----------------------------------------
@@ -294,12 +289,12 @@
The confirmation email shows no errors at all.
- >>> print_emails(notifications=test_emails)
+ >>> print_emails(notifications=test_emails, decode=True)
From: ...
To: carlos@xxxxxxxxxxxxx
Subject: Launchpad translation download: Evolution trunk -
evolution-2.2 template
- Hello Carlos Perell=C3=B3 Mar=C3=ADn,
+ Hello Carlos Perelló Marín,
<BLANKLINE>
The translation files you requested from Launchpad are ready for
download from the following location:
@@ -310,10 +305,9 @@
download these translations again, you will have to request
them again at
<BLANKLINE>
- http://translations.launchpad.../trunk/+pots/evolution-2.2/+ex=
- port
+ http://translations.launchpad.../trunk/+pots/evolution-2.2/+export
<BLANKLINE>
- -- =
+ --
Automatic message from Launchpad.net.
<BLANKLINE>
----------------------------------------
=== modified file 'lib/lp/translations/doc/poexport-request.txt'
--- lib/lp/translations/doc/poexport-request.txt 2018-06-02 13:37:18 +0000
+++ lib/lp/translations/doc/poexport-request.txt 2019-05-15 08:02:45 +0000
@@ -182,7 +182,7 @@
>>> emails = pop_notifications()
>>> len(emails)
1
- >>> print_emails(notifications=emails)
+ >>> print_emails(notifications=emails, decode=True)
From: ...
To: downloader@xxxxxxxxxxx
Subject: Launchpad translation download: Ubuntu Hoary pmount - Czech
@@ -198,10 +198,9 @@
download these translations again, you will have to request
them again at
<BLANKLINE>
- http://translations.launchpad.../pmount/+pots/pmoun=
- t/cs/+export
+ http://translations.launchpad.../pmount/+pots/pmount/cs/+export
<BLANKLINE>
- -- =
+ --
Automatic message from Launchpad.net.
----------------------------------------
Follow ups