launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #19536
[Merge] lp:~wgrant/launchpad/test-no-sequence-deps into lp:launchpad
William Grant has proposed merging lp:~wgrant/launchpad/test-no-sequence-deps into lp:launchpad.
Commit message:
Fix non-Translations tests to cope with sequences not being reset between tests.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~wgrant/launchpad/test-no-sequence-deps/+merge/273373
Fix non-Translations tests to cope with sequences not being reset between tests, so we can stop setting 250 sequences 22000 times during each test run.
--
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wgrant/launchpad/test-no-sequence-deps into lp:launchpad.
=== modified file 'lib/lp/answers/stories/faq-add.txt'
--- lib/lp/answers/stories/faq-add.txt 2009-11-14 16:30:47 +0000
+++ lib/lp/answers/stories/faq-add.txt 2015-10-05 08:29:03 +0000
@@ -67,7 +67,7 @@
>>> owner_browser.url
'http://answers.launchpad.dev/firefox/+faq/...'
>>> print owner_browser.title
- FAQ #12 : Questions : Mozilla Firefox
+ FAQ #... : Questions : Mozilla Firefox
>>> content = find_main_content(owner_browser.contents)
>>> extract_text(find_tag_by_id(content, 'faq-keywords'))
=== modified file 'lib/lp/answers/stories/this-is-a-faq.txt'
--- lib/lp/answers/stories/this-is-a-faq.txt 2013-09-27 04:13:23 +0000
+++ lib/lp/answers/stories/this-is-a-faq.txt 2015-10-05 08:29:03 +0000
@@ -298,7 +298,7 @@
>>> print owner_browser.url
http://answers.launchpad.dev/firefox/+faq/...
>>> print backslashreplace(owner_browser.title)
- FAQ #12 : Questions : Mozilla Firefox
+ FAQ #... : Questions : Mozilla Firefox
The FAQ keywords and content appears just below:
=== modified file 'lib/lp/app/doc/tales.txt'
--- lib/lp/app/doc/tales.txt 2015-10-01 10:25:19 +0000
+++ lib/lp/app/doc/tales.txt 2015-10-05 08:29:03 +0000
@@ -847,10 +847,10 @@
The "standard" 'url' name is supported:
>>> test_tales("bugwatch/fmt:url", bugwatch=sf_bugwatch)
- u'http://bugs.launchpad.dev/bugs/12/+watch/13'
+ u'http://bugs.launchpad.dev/bugs/12/+watch/...'
>>> test_tales("bugwatch/fmt:url", bugwatch=email_bugwatch)
- u'http://bugs.launchpad.dev/bugs/12/+watch/14'
+ u'http://bugs.launchpad.dev/bugs/12/+watch/...'
As are 'external-link' and 'external-link-short', which help when hiding
email addresses from users who are not logged in:
=== modified file 'lib/lp/archiveuploader/tests/test_uploadprocessor.py'
--- lib/lp/archiveuploader/tests/test_uploadprocessor.py 2015-09-08 09:09:28 +0000
+++ lib/lp/archiveuploader/tests/test_uploadprocessor.py 2015-10-05 08:29:03 +0000
@@ -1036,8 +1036,8 @@
contents = [
"Subject: [ubuntu/partner] foocomm_1.0-1_i386.changes (Rejected)",
- "Attempt to upload binaries specifying build 31, "
- "where they don't fit."]
+ "Attempt to upload binaries specifying build %d, "
+ "where they don't fit." % foocomm_build.id]
self.assertEmails([{"contents": contents}])
# Reset upload queue directory for a new upload.
=== modified file 'lib/lp/bugs/browser/tests/bug-views.txt'
--- lib/lp/bugs/browser/tests/bug-views.txt 2012-08-08 11:48:29 +0000
+++ lib/lp/bugs/browser/tests/bug-views.txt 2015-10-05 08:29:03 +0000
@@ -822,11 +822,11 @@
searched for.
>>> for bug in view.similar_bugs:
- ... print "Bug %s: %s" % (bug.id, bug.title)
- Bug 1: New title
- Bug 4: Reflow problems with complex page layouts
- Bug 5: Firefox install instructions should be complete
- Bug 17: a firefox bug
+ ... print bug.title
+ New title
+ Reflow problems with complex page layouts
+ Firefox install instructions should be complete
+ a firefox bug
If we refine the search critera, we'll get different results.
@@ -837,5 +837,5 @@
... (firefox, request), name="+filebug-show-similar")
>>> view.initialize()
>>> for bug in view.similar_bugs:
- ... print "Bug %s: %s" % (bug.id, bug.title)
- Bug 4: Reflow problems with complex page layouts
+ ... print bug.title
+ Reflow problems with complex page layouts
=== modified file 'lib/lp/bugs/doc/bugnotification-sending.txt'
--- lib/lp/bugs/doc/bugnotification-sending.txt 2015-09-11 12:20:23 +0000
+++ lib/lp/bugs/doc/bugnotification-sending.txt 2015-10-05 08:29:03 +0000
@@ -370,8 +370,8 @@
... print_notification(
... message, extra_headers=['X-Launchpad-Bug-Duplicate'])
To: test@xxxxxxxxxxxxx
- From: Sample Person <16@xxxxxxxxxxxxxxxxxx>
- Subject: [Bug 16] [NEW] new bug
+ From: Sample Person <...@bugs.launchpad.net>
+ Subject: [Bug ...] [NEW] new bug
X-Launchpad-Message-Rationale: Subscriber
X-Launchpad-Message-For: name12
<BLANKLINE>
@@ -401,8 +401,8 @@
... print_notification(
... message, extra_headers=['X-Launchpad-Bug-Duplicate'])
To: test@xxxxxxxxxxxxx
- From: Sample Person <16@xxxxxxxxxxxxxxxxxx>
- Subject: [Bug 16] subject
+ From: Sample Person <...@bugs.launchpad.net>
+ Subject: [Bug ...] subject
X-Launchpad-Message-Rationale: Subscriber
X-Launchpad-Message-For: name12
X-Launchpad-Bug-Duplicate: 1
=== modified file 'lib/lp/bugs/doc/bugtask-search.txt'
--- lib/lp/bugs/doc/bugtask-search.txt 2013-05-01 21:23:16 +0000
+++ lib/lp/bugs/doc/bugtask-search.txt 2015-10-05 08:29:03 +0000
@@ -157,9 +157,9 @@
... user=None, hardware_bus=HWBus.PCI, hardware_vendor_id='0x10de',
... hardware_product_id='0x0455', hardware_owner_is_bug_reporter=True)
>>> for bugtask in ubuntu.searchTasks(search_params):
- ... print bugtask.bug.id, bugtask.bug.owner.displayname
- 1 Sample Person
- 2 Sample Person
+ ... print bugtask.bug.title
+ Firefox does not support SVG
+ Blackhole Trash folder
If one of the parameters bus, vendor ID or prodct ID is missing,
the query is not limited to any devices. In other words, we get
@@ -170,12 +170,12 @@
... user=None, hardware_bus=HWBus.PCI, hardware_vendor_id='0x10de',
... hardware_owner_is_bug_reporter=True)
>>> for bugtask in ubuntu.searchTasks(search_params):
- ... print bugtask.bug.id, bugtask.bug.owner.displayname
- 1 Sample Person
- 9 Foo Bar
- 10 Foo Bar
- 2 Sample Person
- 16 No Privileges Person
+ ... print bugtask.bug.title
+ Firefox does not support SVG
+ Thunderbird crashes
+ another test bug
+ Blackhole Trash folder
+ Bug to be fixed in trunk
Similary, we can search for device drivers appearing in HWDB submissions
of a bug reporter.
@@ -262,14 +262,12 @@
>>> from lp.hardwaredb.interfaces.hwdb import IHWSubmissionSet
>>> hw_submission = getUtility(IHWSubmissionSet).getBySubmissionKey(
... 'sample-submission')
- >>> bug_16 = getUtility(IBugSet).get(16)
- >>> bug_16.linkHWSubmission(hw_submission)
+ >>> bug.linkHWSubmission(hw_submission)
>>> search_params = BugTaskSearchParams(
... user=None, hardware_bus=HWBus.PCI, hardware_vendor_id='0x10de',
... hardware_product_id='0x0455', hardware_is_linked_to_bug=True)
- >>> for bugtask in ubuntu.searchTasks(search_params):
- ... print bugtask.bug.id
- 16
+ >>> [bug.default_bugtask] == list(ubuntu.searchTasks(search_params))
+ True
If a device appears in a private submission, related bugs are shown
only if the user running the request is the owner of the submission
@@ -281,17 +279,15 @@
... user=sample_person, hardware_bus=HWBus.PCI,
... hardware_vendor_id='0x10de', hardware_product_id='0x0455',
... hardware_is_linked_to_bug=True)
- >>> for bugtask in ubuntu.searchTasks(search_params):
- ... print bugtask.bug.id
- 16
+ >>> [bug.default_bugtask] == list(ubuntu.searchTasks(search_params))
+ True
>>> foo_bar = getUtility(IPersonSet).getByEmail('foo.bar@xxxxxxxxxxxxx')
>>> search_params = BugTaskSearchParams(
... user=foo_bar, hardware_bus=HWBus.PCI, hardware_vendor_id='0x10de',
... hardware_product_id='0x0455', hardware_is_linked_to_bug=True)
- >>> for bugtask in ubuntu.searchTasks(search_params):
- ... print bugtask.bug.id
- 16
+ >>> [bug.default_bugtask] == list(ubuntu.searchTasks(search_params))
+ True
Other users cannot see that a bug is related to a device from a
private submission.
@@ -321,20 +317,18 @@
Here is the list of bugs for Ubuntu.
>>> def bugTaskInfo(bugtask):
- ... return '%i %i %s %s' % (
- ... bugtask.id, bugtask.bug.id, bugtask.bugtargetdisplayname,
- ... bugtask.bug.title)
+ ... return '%s %s' % (bugtask.bugtargetdisplayname, bugtask.bug.title)
>>> params = BugTaskSearchParams(
... orderby='-number_of_duplicates', user=None)
>>> ubuntu_tasks = ubuntu.searchTasks(params)
>>> for bugtask in ubuntu_tasks:
... print bugTaskInfo(bugtask)
- 17 1 mozilla-firefox (Ubuntu) Firefox does not support SVG
- 23 9 thunderbird (Ubuntu) Thunderbird crashes
- 25 10 linux-source-2.6.15 (Ubuntu) another test bug
- 26 2 Ubuntu Blackhole Trash folder
- 36 16 cdrkit (Ubuntu) Bug to be fixed in trunk
+ mozilla-firefox (Ubuntu) Firefox does not support SVG
+ thunderbird (Ubuntu) Thunderbird crashes
+ linux-source-2.6.15 (Ubuntu) another test bug
+ Ubuntu Blackhole Trash folder
+ cdrkit (Ubuntu) Bug to be fixed in trunk
None of these bugs have any duplicates.
@@ -357,11 +351,11 @@
>>> ubuntu_tasks = ubuntu.searchTasks(params)
>>> for bugtask in ubuntu_tasks:
... print bugTaskInfo(bugtask)
- 23 9 thunderbird (Ubuntu) Thunderbird crashes
- 17 1 mozilla-firefox (Ubuntu) Firefox does not support SVG
- 25 10 linux-source-2.6.15 (Ubuntu) another test bug
- 26 2 Ubuntu Blackhole Trash folder
- 36 16 cdrkit (Ubuntu) Bug to be fixed in trunk
+ thunderbird (Ubuntu) Thunderbird crashes
+ mozilla-firefox (Ubuntu) Firefox does not support SVG
+ linux-source-2.6.15 (Ubuntu) another test bug
+ Ubuntu Blackhole Trash folder
+ cdrkit (Ubuntu) Bug to be fixed in trunk
=== Ordering by number of comments ===
@@ -375,13 +369,12 @@
>>> ubuntu_tasks = ubuntu.searchTasks(params)
>>> for bugtask in ubuntu_tasks:
... bug = bugtask.bug
- ... print '%s %s [%s comments]' % (
- ... bug.id, bug.title, bug.message_count)
- 2 Blackhole Trash folder [3 comments]
- 1 Firefox does not support SVG [2 comments]
- 10 another test bug [2 comments]
- 9 Thunderbird crashes [1 comments]
- 16 Bug to be fixed in trunk [1 comments]
+ ... print '%s [%s comments]' % (bug.title, bug.message_count)
+ Blackhole Trash folder [3 comments]
+ Firefox does not support SVG [2 comments]
+ another test bug [2 comments]
+ Thunderbird crashes [1 comments]
+ Bug to be fixed in trunk [1 comments]
=== Ordering by bug heat ===
@@ -393,18 +386,18 @@
>>> ubuntu_tasks = ubuntu.searchTasks(params)
>>> for task in ubuntu_tasks:
... removeSecurityProxy(task.bug).heat = task.bug.id
+ >>> removeSecurityProxy(bug).heat = 16
>>> transaction.commit()
>>> params = BugTaskSearchParams(orderby='-heat', user=None)
>>> ubuntu_tasks = ubuntu.searchTasks(params)
>>> for bugtask in ubuntu_tasks:
... bug = bugtask.bug
- ... print '%s %s [heat: %s]' % (
- ... bug.id, bug.title, bug.heat)
- 16 Bug to be fixed in trunk [heat: 16]
- 10 another test bug [heat: 10]
- 9 Thunderbird crashes [heat: 9]
- 2 Blackhole Trash folder [heat: 2]
- 1 Firefox does not support SVG [heat: 1]
+ ... print '%s [heat: %s]' % (bug.title, bug.heat)
+ Bug to be fixed in trunk [heat: 16]
+ another test bug [heat: 10]
+ Thunderbird crashes [heat: 9]
+ Blackhole Trash folder [heat: 2]
+ Firefox does not support SVG [heat: 1]
=== Ordering by patch age ===
@@ -421,11 +414,11 @@
>>> ubuntu_tasks = ubuntu.searchTasks(params)
>>> for bugtask in ubuntu_tasks:
... print bugTaskInfo(bugtask)
- 36 16 cdrkit (Ubuntu) Bug to be fixed in trunk
- 26 2 Ubuntu Blackhole Trash folder
- 25 10 linux-source-2.6.15 (Ubuntu) another test bug
- 23 9 thunderbird (Ubuntu) Thunderbird crashes
- 17 1 mozilla-firefox (Ubuntu) Firefox does not support SVG
+ cdrkit (Ubuntu) Bug to be fixed in trunk
+ Ubuntu Blackhole Trash folder
+ linux-source-2.6.15 (Ubuntu) another test bug
+ thunderbird (Ubuntu) Thunderbird crashes
+ mozilla-firefox (Ubuntu) Firefox does not support SVG
If we add a patch attachment to bug 2 and bug 10, they are listed first.
@@ -440,8 +433,8 @@
>>> ubuntu_tasks = ubuntu.searchTasks(params)
>>> for bugtask in ubuntu_tasks:
... print bugTaskInfo(bugtask)
- 26 2 Ubuntu Blackhole Trash folder
- 25 10 linux-source-2.6.15 (Ubuntu) another test bug
- 36 16 cdrkit (Ubuntu) Bug to be fixed in trunk
- 23 9 thunderbird (Ubuntu) Thunderbird crashes
- 17 1 mozilla-firefox (Ubuntu) Firefox does not support SVG
+ Ubuntu Blackhole Trash folder
+ linux-source-2.6.15 (Ubuntu) another test bug
+ cdrkit (Ubuntu) Bug to be fixed in trunk
+ thunderbird (Ubuntu) Thunderbird crashes
+ mozilla-firefox (Ubuntu) Firefox does not support SVG
=== modified file 'lib/lp/bugs/stories/bug-also-affects/xx-bug-also-affects.txt'
--- lib/lp/bugs/stories/bug-also-affects/xx-bug-also-affects.txt 2013-09-27 04:13:23 +0000
+++ lib/lp/bugs/stories/bug-also-affects/xx-bug-also-affects.txt 2015-10-05 08:29:03 +0000
@@ -231,7 +231,7 @@
>>> browser.getControl(name='field.product').value = other_product_name
>>> browser.getControl('Continue').click()
>>> print browser.url
- http://bugs.launchpad.dev/proprietary-product/+bug/16/+choose-affected-product
+ http://bugs.launchpad.dev/proprietary-product/+bug/.../+choose-affected-product
>>> print_feedback_messages(browser.contents)
There is 1 error.
=== modified file 'lib/lp/bugs/stories/bugs/xx-bug-create-question.txt'
--- lib/lp/bugs/stories/bugs/xx-bug-create-question.txt 2014-11-27 22:13:36 +0000
+++ lib/lp/bugs/stories/bugs/xx-bug-create-question.txt 2015-10-05 08:29:03 +0000
@@ -200,7 +200,7 @@
>>> message = find_tag_by_id(user_browser.contents, 'bug-is-question')
>>> print extract_text(message)
- This bug report was converted into a question:...question #16...
+ This bug report was converted into a question:...question #...
Remove the question
=== modified file 'lib/lp/bugs/stories/bugtask-searches/xx-searching-by-tags.txt'
--- lib/lp/bugs/stories/bugtask-searches/xx-searching-by-tags.txt 2012-10-02 06:36:44 +0000
+++ lib/lp/bugs/stories/bugtask-searches/xx-searching-by-tags.txt 2015-10-05 08:29:03 +0000
@@ -43,8 +43,10 @@
>>> anon_browser.getControl(name='field.tags_combinator').value = ['ALL']
>>> anon_browser.getControl('Search', index=1).click()
>>> from lp.bugs.tests.bug import print_bugtasks
- >>> print_bugtasks(anon_browser.contents)
- 16 test bug a Mozilla Firefox Undecided New
+ >>> 'test bug a' in anon_browser.contents
+ True
+ >>> 'test bug b' in anon_browser.contents
+ False
We go to the bug search page and search for bugs with any of the tags.
Both bugs are returned.
@@ -54,9 +56,10 @@
... name='field.tag').value = 'test-tag-1 test-tag-2'
>>> anon_browser.getControl(name='field.tags_combinator').value = ['ANY']
>>> anon_browser.getControl('Search', index=1).click()
- >>> print_bugtasks(anon_browser.contents)
- 16 test bug a Mozilla Firefox Undecided New
- 17 test bug b Mozilla Firefox Undecided New
+ >>> 'test bug a' in anon_browser.contents
+ True
+ >>> 'test bug b' in anon_browser.contents
+ True
Same works for user related bugs:
@@ -65,9 +68,10 @@
... name='field.tag').value = 'test-tag-1 test-tag-2'
>>> anon_browser.getControl(name='field.tags_combinator').value = ['ANY']
>>> anon_browser.getControl('Search', index=1).click()
- >>> print_bugtasks(anon_browser.contents)
- 16 test bug a Mozilla Firefox Undecided New
- 17 test bug b Mozilla Firefox Undecided New
+ >>> 'test bug a' in anon_browser.contents
+ True
+ >>> 'test bug b' in anon_browser.contents
+ True
When we search for bugs with all the tags, though, only the first bug is
returned, since it's the only bug with both tags.
@@ -77,8 +81,10 @@
... name='field.tag').value = 'test-tag-1 test-tag-2'
>>> anon_browser.getControl(name='field.tags_combinator').value = ['ALL']
>>> anon_browser.getControl('Search', index=1).click()
- >>> print_bugtasks(anon_browser.contents)
- 16 test bug a Mozilla Firefox Undecided New
+ >>> 'test bug a' in anon_browser.contents
+ True
+ >>> 'test bug b' in anon_browser.contents
+ False
And also for user related bugs:
@@ -87,5 +93,7 @@
... name='field.tag').value = 'test-tag-1 test-tag-2'
>>> anon_browser.getControl(name='field.tags_combinator').value = ['ALL']
>>> anon_browser.getControl('Search', index=1).click()
- >>> print_bugtasks(anon_browser.contents)
- 16 test bug a Mozilla Firefox Undecided New
+ >>> 'test bug a' in anon_browser.contents
+ True
+ >>> 'test bug b' in anon_browser.contents
+ False
=== modified file 'lib/lp/bugs/stories/patches-view/patches-view.txt'
--- lib/lp/bugs/stories/patches-view/patches-view.txt 2014-11-29 06:41:25 +0000
+++ lib/lp/bugs/stories/patches-view/patches-view.txt 2015-10-05 08:29:03 +0000
@@ -81,7 +81,7 @@
... 'http://bugs.launchpad.dev/patchy-product-1/+patches')
>>> show_patches_view(anon_browser.contents)
Bug Importance Status Patch Age
- Bug #16: bug_a title Undecided New ...second...
+ Bug #...: bug_a title Undecided New ...second...
From: Patchy Person
Link: patch_a.diff description of patch a
@@ -153,13 +153,13 @@
>>> anon_browser.open('http://bugs.launchpad.dev/patchy-product-1/+patches')
>>> show_patches_view(anon_browser.contents)
Bug Importance Status Patch Age
- Bug #18: bug_c title Wishlist Fix Committed ...second...
+ Bug #...: bug_c title Wishlist Fix Committed ...second...
From: Patchy Person
Link: patch_f.diff description of patch f
- Bug #17: bug_b title Critical Confirmed ...second...
+ Bug #...: bug_b title Critical Confirmed ...second...
From: Patchy Person
Link: patch_c.diff description of patch c
- Bug #16: bug_a title Undecided New ...second...
+ Bug #...: bug_a title Undecided New ...second...
From: Patchy Person
Link: patch_a.diff description of patch a
@@ -172,13 +172,13 @@
'http://bugs.launchpad.dev/patchy-product-1/+patches?orderby=-importance'
>>> show_patches_view(anon_browser.contents)
Bug Importance Status Patch Age
- Bug #17: bug_b title Critical Confirmed ...second...
+ Bug #...: bug_b title Critical Confirmed ...second...
From: Patchy Person
Link: patch_c.diff description of patch c
- Bug #18: bug_c title Wishlist Fix Committed ...second...
+ Bug #...: bug_c title Wishlist Fix Committed ...second...
From: Patchy Person
Link: patch_f.diff description of patch f
- Bug #16: bug_a title Undecided New ...second...
+ Bug #...: bug_a title Undecided New ...second...
From: Patchy Person
Link: patch_a.diff description of patch a
@@ -188,13 +188,13 @@
'http://bugs.launchpad.dev/patchy-product-1/+patches?orderby=status'
>>> show_patches_view(anon_browser.contents)
Bug Importance Status Patch Age
- Bug #16: bug_a title Undecided New ...second...
+ Bug #...: bug_a title Undecided New ...second...
From: Patchy Person
Link: patch_a.diff description of patch a
- Bug #17: bug_b title Critical Confirmed ...second...
+ Bug #...: bug_b title Critical Confirmed ...second...
From: Patchy Person
Link: patch_c.diff description of patch c
- Bug #18: bug_c title Wishlist Fix Committed ...second...
+ Bug #...: bug_c title Wishlist Fix Committed ...second...
From: Patchy Person
Link: patch_f.diff description of patch f
@@ -264,11 +264,11 @@
... 'https://bugs.launchpad.dev/patchy-product-1/trunk/+patches')
>>> show_patches_view(anon_browser.contents)
Bug Importance Status Patch Age
- Bug #18: bug_c title Wishlist Fix Committed ...second...
+ Bug #...: bug_c title Wishlist Fix Committed ...second...
From: Patchy Person
Link: patch_f.diff
description of patch f
- Bug #16: bug_a title Undecided New ...second...
+ Bug #...: bug_a title Undecided New ...second...
From: Patchy Person
Link: patch_a.diff
description of patch a
=== modified file 'lib/lp/bugs/stories/webservice/xx-bug.txt'
--- lib/lp/bugs/stories/webservice/xx-bug.txt 2012-12-10 13:43:47 +0000
+++ lib/lp/bugs/stories/webservice/xx-bug.txt 2015-10-05 08:29:03 +0000
@@ -75,14 +75,16 @@
>>> project_collection = webservice.get(
... "/projects?ws.op=search&text=firefox").jsonBody()
>>> firefox = project_collection['entries'][0]
- >>> print webservice.named_post(
+ >>> response = webservice.named_post(
... '/bugs', 'createBug',
... title='Test bug', description='Test bug',
... target=firefox['self_link'])
+ >>> print response
HTTP/1.1 201 Created
...
Location: http://.../bugs/...
...
+ >>> new_bug_id = int(response.getHeader("Location").rsplit('/', 1)[-1])
>>> print webservice.named_post(
... '/bugs', 'createBug',
@@ -195,25 +197,24 @@
the web UI. It is impossible, for example, to create circular relationships.
Due to bug #1088358 the error is escaped as if it was HTML.
-
+ >>> dupe_url = webservice.getAbsoluteUrl('/bugs/%d' % new_bug_id)
>>> print webservice.patch(
- ... webservice.getAbsoluteUrl('/bugs/16'), 'application/json',
+ ... dupe_url, 'application/json',
... dumps(dict(
... duplicate_of_link=webservice.getAbsoluteUrl('/bugs/5'))))
HTTP/1.1 209 Content Returned...
>>> print webservice.patch(
... webservice.getAbsoluteUrl('/bugs/5'), 'application/json',
- ... dumps(dict(
- ... duplicate_of_link=webservice.getAbsoluteUrl('/bugs/16'))))
+ ... dumps(dict(duplicate_of_link=dupe_url)))
HTTP/1.1 400 Bad Request
...
- Bug 16 is already a duplicate of bug 5. You
+ Bug ... is already a duplicate of bug 5. You
can only mark a bug report as duplicate of one that
isn't a duplicate itself...
>>> print webservice.patch(
- ... webservice.getAbsoluteUrl('/bugs/16'), 'application/json',
+ ... dupe_url, 'application/json',
... dumps(dict(duplicate_of_link=None)))
HTTP/1.1 209 Content Returned...
@@ -549,7 +550,7 @@
... target=webservice.getAbsoluteUrl('/ubuntu/+source/alsa-utils'))
HTTP/1.1 301 Moved Permanently
...
- Location: http://api.launchpad.dev/beta/ubuntu/+source/alsa-utils/+bug/19
+ Location: http://api.launchpad.dev/beta/ubuntu/+source/alsa-utils/+bug/...
...
It's possible to get a list of similar bugs for a bug task by calling
@@ -1107,7 +1108,7 @@
HTTP/1.1 201 Created...
Content-Length: 0
...
- Location: http://.../bugs/1/+watch/13
+ Location: http://.../bugs/1/+watch/...
...
Following the redirect, we can see the new bug watch:
@@ -1116,7 +1117,7 @@
>>> new_bug_watch = webservice.get(new_bug_watch_path).jsonBody()
>>> pprint_entry(new_bug_watch)
bug_link: u'http://.../bugs/1'
- bug_tasks_collection_link: u'http://.../bugs/1/+watch/13/bug_tasks'
+ bug_tasks_collection_link: u'http://.../bugs/1/+watch/.../bug_tasks'
bug_tracker_link: u'http://.../bugs/bugtrackers/mozilla.org'
date_created: u'...'
date_last_changed: None
@@ -1128,10 +1129,10 @@
remote_importance: None
remote_status: None
resource_type_link: u'http://.../#bug_watch'
- self_link: u'http://.../bugs/1/+watch/13'
+ self_link: u'http://.../bugs/1/+watch/...'
title: u'The Mozilla.org Bug Tracker #9876'
url: u'https://bugzilla.mozilla.org/show_bug.cgi?id=9876'
- web_link: u'http://bugs.../bugs/1/+watch/13'
+ web_link: u'http://bugs.../bugs/1/+watch/...'
Bug Trackers
------------
@@ -1390,13 +1391,15 @@
total_size: 5
---
...
- self_link: u'http://api.launchpad.dev/beta/firefox/+bug/5'
- ...
- self_link: u'http://api.launchpad.dev/beta/firefox/+bug/4'
- ...
- self_link: u'http://api.launchpad.dev/beta/firefox/+bug/1'
- ...
- self_link: u'http://api.launchpad.dev/beta/firefox/+bug/16'
+ target_link: u'http://api.launchpad.dev/beta/firefox'
+ ...
+ target_link: u'http://api.launchpad.dev/beta/firefox'
+ ...
+ target_link: u'http://api.launchpad.dev/beta/firefox'
+ ...
+ target_link: u'http://api.launchpad.dev/beta/firefox'
+ ...
+ target_link: u'http://api.launchpad.dev/beta/firefox'
...
Some parameters accept lists of values, just like when searching from
@@ -1548,13 +1551,9 @@
>>> ordered_bugtasks = webservice.named_get(
... '/ubuntu', 'searchTasks',
... order_by='-datecreated').jsonBody()['entries']
- >>> for ordered_bugtask in ordered_bugtasks:
- ... print ordered_bugtask['self_link']
- http://.../ubuntu/+source/alsa-utils/+bug/19
- http://.../ubuntu/+source/evolution/+bug/18
- http://.../ubuntu/+bug/17
- http://.../ubuntu/+bug/2
- http://.../ubuntu/+source/linux-source-2.6.15/+bug/10
+ >>> dates = [task['date_created'] for task in ordered_bugtasks]
+ >>> dates == sorted(dates, reverse=True)
+ True
Hardware related bug tasks
@@ -1772,22 +1771,16 @@
>>> bugtasks = webservice.named_get(
... '/firefox', 'searchTasks',
... linked_branches='Show only Bugs with linked Branches')
- >>> for bugtask in bugtasks.jsonBody()['entries']:
- ... print bugtask['self_link']
- http://api.launchpad.dev/beta/firefox/+bug/5
- http://api.launchpad.dev/beta/firefox/+bug/4
+ >>> bugtasks.jsonBody()['total_size']
+ 2
...and we can search for bugs that are not linked to branches.
>>> bugtasks = webservice.named_get(
... '/firefox', 'searchTasks',
... linked_branches='Show only Bugs without linked Branches')
- >>> for bugtask in bugtasks.jsonBody()['entries']:
- ... print bugtask['self_link']
- http://api.launchpad.dev/beta/firefox/+bug/1
- http://api.launchpad.dev/beta/firefox/+bug/16
- http://api.launchpad.dev/beta/firefox/+bug/20
- http://api.launchpad.dev/beta/firefox/+bug/24
+ >>> bugtasks.jsonBody()['total_size']
+ 4
Affected users
=== modified file 'lib/lp/coop/answersbugs/tests/notifications-linked-bug.txt'
--- lib/lp/coop/answersbugs/tests/notifications-linked-bug.txt 2012-04-10 14:01:17 +0000
+++ lib/lp/coop/answersbugs/tests/notifications-linked-bug.txt 2015-10-05 08:29:03 +0000
@@ -40,7 +40,7 @@
http://.../ubuntu/+bug/...
"Installer fails on a Mac PPC"
<BLANKLINE>
- This bug is linked to #15.
+ This bug is linked to #...
Can't install Ubuntu
http://.../ubuntu/+question/...
=== modified file 'lib/lp/hardwaredb/stories/webservice/xx-hwdb.txt'
--- lib/lp/hardwaredb/stories/webservice/xx-hwdb.txt 2011-12-24 17:49:30 +0000
+++ lib/lp/hardwaredb/stories/webservice/xx-hwdb.txt 2015-10-05 08:29:03 +0000
@@ -247,66 +247,66 @@
>>> drivers = webservice.get('/+hwdb?ws.op=drivers&ws.size=15').jsonBody()
>>> for entry in drivers['entries']:
... pprint_entry(entry)
- id: 1
+ id: ...
license: None
name: u'ehci_hcd'
package_name: u'linux-image-2.6.24-19-generic'
resource_type_link: u'http://api.launchpad.dev/beta/#h_w_driver'
- self_link: u'http://api.launchpad.dev/beta/+hwdb/+driver/1'
- id: 2
+ self_link: u'http://api.launchpad.dev/beta/+hwdb/+driver/...'
+ id: ...
license: None
name: u'usb'
package_name: u'linux-image-2.6.24-19-generic'
resource_type_link: u'http://api.launchpad.dev/beta/#h_w_driver'
- self_link: u'http://api.launchpad.dev/beta/+hwdb/+driver/2'
- id: 3
+ self_link: u'http://api.launchpad.dev/beta/+hwdb/+driver/...'
+ id: ...
license: None
name: u'usb-storage'
package_name: u'linux-image-2.6.24-19-generic'
resource_type_link: u'http://api.launchpad.dev/beta/#h_w_driver'
- self_link: u'http://api.launchpad.dev/beta/+hwdb/+driver/3'
- id: 4
+ self_link: u'http://api.launchpad.dev/beta/+hwdb/+driver/...'
+ id: ...
license: None
name: u'sd'
package_name: u'linux-image-2.6.24-19-generic'
resource_type_link: u'http://api.launchpad.dev/beta/#h_w_driver'
- self_link: u'http://api.launchpad.dev/beta/+hwdb/+driver/4'
- id: 5
+ self_link: u'http://api.launchpad.dev/beta/+hwdb/+driver/...'
+ id: ...
license: None
name: u'hub'
package_name: u'linux-image-2.6.24-19-generic'
resource_type_link: u'http://api.launchpad.dev/beta/#h_w_driver'
- self_link: u'http://api.launchpad.dev/beta/+hwdb/+driver/5'
- id: 6
+ self_link: u'http://api.launchpad.dev/beta/+hwdb/+driver/...'
+ id: ...
license: None
name: u'ahci'
package_name: u'linux-image-2.6.24-19-generic'
resource_type_link: u'http://api.launchpad.dev/beta/#h_w_driver'
- self_link: u'http://api.launchpad.dev/beta/+hwdb/+driver/6'
- id: 7
+ self_link: u'http://api.launchpad.dev/beta/+hwdb/+driver/...'
+ id: ...
license: None
name: u'sr'
package_name: u'linux-image-2.6.24-19-generic'
resource_type_link: u'http://api.launchpad.dev/beta/#h_w_driver'
- self_link: u'http://api.launchpad.dev/beta/+hwdb/+driver/7'
- id: 8
+ self_link: u'http://api.launchpad.dev/beta/+hwdb/+driver/...'
+ id: ...
license: None
name: u'nv'
package_name: u'xorg'
resource_type_link: u'http://api.launchpad.dev/beta/#h_w_driver'
- self_link: u'http://api.launchpad.dev/beta/+hwdb/+driver/8'
- id: 9
+ self_link: u'http://api.launchpad.dev/beta/+hwdb/+driver/...'
+ id: ...
license: None
name: u'usb'
package_name: u''
resource_type_link: u'http://api.launchpad.dev/beta/#h_w_driver'
- self_link: u'http://api.launchpad.dev/beta/+hwdb/+driver/9'
- id: 10
+ self_link: u'http://api.launchpad.dev/beta/+hwdb/+driver/...'
+ id: ...
license: None
name: u'foo'
package_name: u''
resource_type_link: u'http://api.launchpad.dev/beta/#h_w_driver'
- self_link: u'http://api.launchpad.dev/beta/+hwdb/+driver/10'
+ self_link: u'http://api.launchpad.dev/beta/+hwdb/+driver/...'
If we specify a package name, only drivers from this package are
returned.
@@ -315,12 +315,12 @@
... '/+hwdb?ws.op=drivers&package_name=xorg').jsonBody()
>>> [nv_xorg_driver] = drivers['entries']
>>> pprint_entry(nv_xorg_driver)
- id: 8
+ id: ...
license: None
name: u'nv'
package_name: u'xorg'
resource_type_link: u'http://api.launchpad.dev/beta/#h_w_driver'
- self_link: u'http://api.launchpad.dev/beta/+hwdb/+driver/8'
+ self_link: u'http://api.launchpad.dev/beta/+hwdb/+driver/...'
If we specify an empty package name, those drivers are returned where
a package_name is not recorded.
@@ -329,18 +329,18 @@
... '/+hwdb?ws.op=drivers&package_name=').jsonBody()
>>> for entry in drivers['entries']:
... pprint_entry(entry)
- id: 9
+ id: ...
license: None
name: u'usb'
package_name: u''
resource_type_link: u'http://api.launchpad.dev/beta/#h_w_driver'
- self_link: u'http://api.launchpad.dev/beta/+hwdb/+driver/9'
- id: 10
+ self_link: u'http://api.launchpad.dev/beta/+hwdb/+driver/...'
+ id: ...
license: None
name: u'foo'
package_name: u''
resource_type_link: u'http://api.launchpad.dev/beta/#h_w_driver'
- self_link: u'http://api.launchpad.dev/beta/+hwdb/+driver/10'
+ self_link: u'http://api.launchpad.dev/beta/+hwdb/+driver/...'
If the parameter name is specified but no package_name, all drivers with
the given name are returned.
@@ -349,18 +349,18 @@
... '/+hwdb?ws.op=drivers&name=usb').jsonBody()
>>> for entry in drivers['entries']:
... pprint_entry(entry)
- id: 2
+ id: ...
license: None
name: u'usb'
package_name: u'linux-image-2.6.24-19-generic'
resource_type_link: u'http://api.launchpad.dev/beta/#h_w_driver'
- self_link: u'http://api.launchpad.dev/beta/+hwdb/+driver/2'
- id: 9
+ self_link: u'http://api.launchpad.dev/beta/+hwdb/+driver/...'
+ id: ...
license: None
name: u'usb'
package_name: u''
resource_type_link: u'http://api.launchpad.dev/beta/#h_w_driver'
- self_link: u'http://api.launchpad.dev/beta/+hwdb/+driver/9'
+ self_link: u'http://api.launchpad.dev/beta/+hwdb/+driver/...'
If package_name and name are specified, those records are returned that
match both values.
=== modified file 'lib/lp/registry/stories/announcements/xx-announcements.txt'
--- lib/lp/registry/stories/announcements/xx-announcements.txt 2012-12-11 05:41:50 +0000
+++ lib/lp/registry/stories/announcements/xx-announcements.txt 2015-10-05 08:29:03 +0000
@@ -674,7 +674,7 @@
>>> for id_ in parse_ids(nopriv_browser.contents):
... print extract_text(id_)
tag:launchpad.net,2006-10-16:/guadalinex/+announcements
- tag:launchpad.net,...:/+announcement/28
+ tag:launchpad.net,...:/+announcement/...
>>> priv_browser.open('http://launchpad.dev/guadalinex/+announcements')
>>> "Kubuntu announcement headline" in (
@@ -708,9 +708,9 @@
>>> for id_ in parse_ids(nopriv_browser.contents):
... print extract_text(id_)
tag:launchpad.net,2004-09-24:/apache/+announcements
- tag:launchpad.net,...:/+announcement/26
- tag:launchpad.net,...:/+announcement/24
- tag:launchpad.net,...:/+announcement/25
+ tag:launchpad.net,...:/+announcement/...
+ tag:launchpad.net,...:/+announcement/...
+ tag:launchpad.net,...:/+announcement/...
>>> strainer = SoupStrainer('link', rel='self')
>>> links = parse_links(nopriv_browser.contents, rel='self')
=== modified file 'lib/lp/registry/stories/gpg-coc/xx-gpg-coc.txt'
--- lib/lp/registry/stories/gpg-coc/xx-gpg-coc.txt 2014-11-27 07:48:25 +0000
+++ lib/lp/registry/stories/gpg-coc/xx-gpg-coc.txt 2015-10-05 08:29:03 +0000
@@ -313,7 +313,8 @@
On a mad whim he decides to de-activate the key he just imported.
- >>> browser.getControl(name="DEACTIVATE_GPGKEY").value = ['3']
+ >>> browser.getControl(name="DEACTIVATE_GPGKEY").displayValue = [
+ ... '1024D/17B05A8F (sign only)']
>>> browser.getControl('Deactivate Key').click()
>>> print_feedback_messages(browser.contents)
=== modified file 'lib/lp/registry/stories/milestone/object-milestones.txt'
--- lib/lp/registry/stories/milestone/object-milestones.txt 2015-06-27 04:10:49 +0000
+++ lib/lp/registry/stories/milestone/object-milestones.txt 2015-10-05 08:29:03 +0000
@@ -356,8 +356,8 @@
>>> bug_table = find_tag_by_id(browser.contents, 'milestone_bugtasks')
>>> print extract_text(bug_table )
Bug report Importance Assignee Status
- #19 Test Bug 1 Critical New
- #19 Test Bug 1 High New
+ #... Test Bug 1 Critical New
+ #... Test Bug 1 High New
Each bugtask has one or more badges.
=== modified file 'lib/lp/registry/stories/webservice/xx-project-registry.txt'
--- lib/lp/registry/stories/webservice/xx-project-registry.txt 2015-07-07 22:33:29 +0000
+++ lib/lp/registry/stories/webservice/xx-project-registry.txt 2015-10-05 08:29:03 +0000
@@ -1140,4 +1140,4 @@
Mega Money Maker
>>> print mmm['commercial_subscription_link']
- http://.../mega-money-maker/+commercialsubscription/3
+ http://.../mega-money-maker/+commercialsubscription/...
=== modified file 'lib/lp/services/librarian/tests/test_smoketest.py'
--- lib/lp/services/librarian/tests/test_smoketest.py 2011-12-30 01:48:17 +0000
+++ lib/lp/services/librarian/tests/test_smoketest.py 2015-10-05 08:29:03 +0000
@@ -69,9 +69,8 @@
def test_store_file(self):
# Make sure that the function meant to store a file in the librarian
# and return the file's HTTP URL works.
- self.assertEquals(
- store_file(self.fake_librarian),
- (93, 'http://localhost:58000/93/smoke-test-file'))
+ aid, url = store_file(self.fake_librarian)
+ self.assertEqual('http://localhost:58000/%d/smoke-test-file' % aid, url)
def test_good_data(self):
# If storing and retrieving both the public and private files work,
=== modified file 'lib/lp/soyuz/doc/components-and-sections.txt'
--- lib/lp/soyuz/doc/components-and-sections.txt 2012-12-26 01:32:19 +0000
+++ lib/lp/soyuz/doc/components-and-sections.txt 2015-10-05 08:29:03 +0000
@@ -63,16 +63,16 @@
New component creation for a given name:
>>> new_comp = component_set.new('test')
- >>> print new_comp.id, new_comp.name
- 6 test
+ >>> print new_comp.name
+ test
Ensuring a component (if not found, create it):
- >>> component_set.ensure('test').id
- 6
+ >>> component_set.ensure('test').id == new_comp.id
+ True
- >>> component_set.ensure('test2').id
- 7
+ >>> component_set.ensure('test2').id == new_comp.id
+ False
Importing Section content class and its interface:
@@ -159,13 +159,13 @@
New section creation for a given name:
>>> new_sec = section_set.new('test')
- >>> print new_sec.id, new_sec.name
- 36 test
+ >>> print new_sec.name
+ test
Ensuring a section (if not found, create it):
- >>> section_set.ensure('test').id
- 36
+ >>> section_set.ensure('test').id == new_sec.id
+ True
- >>> section_set.ensure('test2').id
- 37
+ >>> section_set.ensure('test2').id == new_sec.id
+ False
=== modified file 'lib/lp/soyuz/stories/ppa/xx-ppa-files.txt'
--- lib/lp/soyuz/stories/ppa/xx-ppa-files.txt 2014-07-24 09:37:03 +0000
+++ lib/lp/soyuz/stories/ppa/xx-ppa-files.txt 2015-10-05 08:29:03 +0000
@@ -106,6 +106,8 @@
Links to files accessible via +files/ proxy in the Build page.
+ >>> build_id = build.id
+
>>> builds_links = [
... ('see the log', build.log),
... ]
@@ -174,7 +176,8 @@
>>> no_priv_browser.getControl("Filter").click()
>>> check_urls(no_priv_browser, builds_links,
- ... 'http://launchpad.dev/~no-priv/+archive/ubuntu/p3a/+build/31')
+ ... 'http://launchpad.dev/~no-priv/+archive/ubuntu/p3a/+build/%d'
+ ... % build_id)
buildlog_ubuntutest-breezy-autotest-i386.test-pkg_1.0_FULLYBUILT.txt.gz: OK
>>> no_priv_browser.open(
@@ -202,7 +205,8 @@
No Privileges Person
>>> check_urls(no_priv_browser, build_links,
- ... 'http://launchpad.dev/~no-priv/+archive/ubuntu/p3a/+build/31')
+ ... 'http://launchpad.dev/~no-priv/+archive/ubuntu/p3a/+build/%d'
+ ... % build_id)
test-bin_1.0_i386.changes: OK
buildlog_...txt.gz: OK
upload_..._log.txt: OK
=== modified file 'lib/lp/soyuz/stories/soyuz/xx-build-record.txt'
--- lib/lp/soyuz/stories/soyuz/xx-build-record.txt 2015-09-11 06:04:36 +0000
+++ lib/lp/soyuz/stories/soyuz/xx-build-record.txt 2015-10-05 08:29:03 +0000
@@ -251,7 +251,7 @@
uploadlog (7 bytes)
>>> print admin_browser.getLink('Retry this build').url
- http://launchpad.dev/ubuntutest/+source/testing/1.0/+build/31/+retry
+ http://launchpad.dev/ubuntutest/+source/testing/1.0/+build/.../+retry
By clicking on the 'Retry this build' link, administrators are informed of
the consequences of this action.
@@ -334,7 +334,7 @@
testing_1.0_all.changes (15 bytes)
>>> print anon_browser.getLink('testing_1.0_all.changes').url
- http://.../+build/31/+files/testing_1.0_all.changes
+ http://.../+build/.../+files/testing_1.0_all.changes
>>> print extract_text(
... find_tag_by_id(anon_browser.contents, 'binaries'))
@@ -361,7 +361,7 @@
already have access to them.
>>> print anon_browser.getLink('testing-bin_1.0_all.deb').url
- http://.../+build/31/+files/testing-bin_1.0_all.deb
+ http://.../+build/.../+files/testing-bin_1.0_all.deb
Again, note that the files are `ProxiedLibrarianFile` objects as well.
@@ -386,7 +386,7 @@
LinkNotFoundError
>>> print anon_browser.getLink('testing-bin_1.0_all.deb').url
- http://.../+build/31/+files/testing-bin_1.0_all.deb
+ http://.../+build/.../+files/testing-bin_1.0_all.deb
When new binaries are accepted by an archive administrator (See
xx-queue-pages.txt) this condition is presented in the build page.
@@ -410,7 +410,7 @@
LinkNotFoundError
>>> print anon_browser.getLink('testing-bin_1.0_all.deb').url
- http://.../+build/31/+files/testing-bin_1.0_all.deb
+ http://.../+build/.../+files/testing-bin_1.0_all.deb
Once the accepted binary upload is processed by the backend, the
binary reference finally becomes a link to its corresponding page.
=== modified file 'lib/lp/soyuz/stories/soyuz/xx-distributionsourcepackagerelease-pages.txt'
--- lib/lp/soyuz/stories/soyuz/xx-distributionsourcepackagerelease-pages.txt 2015-06-26 14:00:41 +0000
+++ lib/lp/soyuz/stories/soyuz/xx-distributionsourcepackagerelease-pages.txt 2015-10-05 08:29:03 +0000
@@ -227,7 +227,7 @@
View changes file
>>> print anon_browser.getLink('0.9 to 1.0').url
- http://.../101/testing-dspr_0.9_1.0.diff.gz
+ http://.../.../testing-dspr_0.9_1.0.diff.gz
Finally, the 'Binary packages' section lists all binary packages
produced by this source. Each binary links to its specific
=== modified file 'lib/lp/xmlrpc/tests/test_private_xmlrpc.py'
--- lib/lp/xmlrpc/tests/test_private_xmlrpc.py 2013-01-03 00:27:37 +0000
+++ lib/lp/xmlrpc/tests/test_private_xmlrpc.py 2015-10-05 08:29:03 +0000
@@ -69,7 +69,7 @@
bug_dict = dict(
product='firefox', summary='the summary', comment='the comment')
result = external_api.filebug(bug_dict)
- self.assertEqual('http://bugs.launchpad.dev/bugs/16', result)
+ self.assertStartsWith(result, 'http://bugs.launchpad.dev/bugs/')
def test_internal_bugs_api(self):
"""There is an interal bugs api, too, but that doesn't share the same
Follow ups