launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #25399
[Merge] ~cjwatson/launchpad:lazr.restful-0.23.0 into launchpad:master
Colin Watson has proposed merging ~cjwatson/launchpad:lazr.restful-0.23.0 into launchpad:master.
Commit message:
Upgrade to lazr.restful 0.23.0
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/391449
A number of pagetests need to change to account for the pretty-printing changes in https://code.launchpad.net/~cjwatson/lazr.restful/py3-pretty-print-helpers/+merge/390200, but all these changes are just dropping the "u" prefix from string literals.
Dependencies MP: https://code.launchpad.net/~cjwatson/lp-source-dependencies/+git/lp-source-dependencies/+merge/391446
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:lazr.restful-0.23.0 into launchpad:master.
diff --git a/constraints.txt b/constraints.txt
index 0bebad0..e567e25 100644
--- a/constraints.txt
+++ b/constraints.txt
@@ -228,7 +228,7 @@ lazr.delegates==2.0.4
lazr.enum==1.2
lazr.jobrunner==0.16
lazr.lifecycle==1.2
-lazr.restful==0.22.2
+lazr.restful==0.23.0
lazr.restfulclient==0.14.3
lazr.sshserver==0.1.10
lazr.uri==1.0.5
diff --git a/lib/lp/answers/stories/webservice.txt b/lib/lp/answers/stories/webservice.txt
index 84fb53a..852e915 100644
--- a/lib/lp/answers/stories/webservice.txt
+++ b/lib/lp/answers/stories/webservice.txt
@@ -201,23 +201,23 @@ a link to retrieve the question's messages.
answer_link: None
answerer_link: None
assignee_link: None
- date_created: u'20...+00:00'
+ date_created: '20...+00:00'
date_due: None
- date_last_query: u'20...+00:00'
- date_last_response: u'20...+00:00'
+ date_last_query: '20...+00:00'
+ date_last_response: '20...+00:00'
date_solved: None
- description: u'description...'
+ description: 'description...'
id: ...
- language_link: u'http://api.launchpad.test/devel/+languages/en'
+ language_link: 'http://api.launchpad.test/devel/+languages/en'
messages_collection_link:
- u'http://api.launchpad.test/devel/my-project/+question/.../messages'
- owner_link: u'http://api.launchpad.test/devel/~asker'
- resource_type_link: u'http://api.launchpad.test/devel/#question'
- self_link: u'http://api.launchpad.test/devel/my-project/+question/...'
- status: u'Answered'
- target_link: u'http://api.launchpad.test/devel/my-project'
- title: u'Q 1 great'
- web_link: u'http://answers.launchpad.test/my-project/+question/...'
+ 'http://api.launchpad.test/devel/my-project/+question/.../messages'
+ owner_link: 'http://api.launchpad.test/devel/~asker'
+ resource_type_link: 'http://api.launchpad.test/devel/#question'
+ self_link: 'http://api.launchpad.test/devel/my-project/+question/...'
+ status: 'Answered'
+ target_link: 'http://api.launchpad.test/devel/my-project'
+ title: 'Q 1 great'
+ web_link: 'http://answers.launchpad.test/my-project/+question/...'
Question messages
@@ -230,19 +230,19 @@ that indicate how the message changed the question.
... question_1['messages_collection_link'],
... api_version='devel').jsonBody()
>>> pprint_entry(messages['entries'][0])
- action: u'Answer'
- bug_attachments_collection_link: u'...'
- content: u'This is the answer'
- date_created: u'20...+00:00'
+ action: 'Answer'
+ bug_attachments_collection_link: '...'
+ content: 'This is the answer'
+ date_created: '20...+00:00'
index: 1
- new_status: u'Answered'
- owner_link: u'http://api.launchpad.test/devel/~contact'
+ new_status: 'Answered'
+ owner_link: 'http://api.launchpad.test/devel/~contact'
parent_link: None
- question_link: u'http://api.launchpad.test/devel/my-project/+question/...'
- resource_type_link: u'http://api.launchpad.test/devel/#question_message'
+ question_link: 'http://api.launchpad.test/devel/my-project/+question/...'
+ resource_type_link: 'http://api.launchpad.test/devel/#question_message'
self_link:
- u'http://api.launchpad.test/devel/my-project/+question/.../messages/1'
- subject: u'Re: Q 1 great'
+ 'http://api.launchpad.test/devel/my-project/+question/.../messages/1'
+ subject: 'Re: Q 1 great'
visible: True
web_link:
- u'http://answers.launchpad.test/my-project/+question/.../messages/1'
+ 'http://answers.launchpad.test/my-project/+question/.../messages/1'
diff --git a/lib/lp/bugs/stories/webservice/xx-bug-tracker.txt b/lib/lp/bugs/stories/webservice/xx-bug-tracker.txt
index 0983392..5914d8b 100644
--- a/lib/lp/bugs/stories/webservice/xx-bug-tracker.txt
+++ b/lib/lp/bugs/stories/webservice/xx-bug-tracker.txt
@@ -10,25 +10,25 @@ any user can access.
>>> bug_tracker_collection = anon_webservice.get(
... '/bugs/bugtrackers').jsonBody()
>>> pprint_collection(bug_tracker_collection)
- next_collection_link: u'http://.../bugs/bugtrackers?ws.size=5&memo=5&ws.start=5'
- resource_type_link: u'http://.../#bug_trackers'
+ next_collection_link: 'http://.../bugs/bugtrackers?ws.size=5&memo=5&ws.start=5'
+ resource_type_link: 'http://.../#bug_trackers'
start: 0
total_size: 8
---
active: True
- base_url: u'https://bugzilla.mozilla.org/'
+ base_url: 'https://bugzilla.mozilla.org/'
base_url_aliases: []
- bug_tracker_type: u'Bugzilla'
- contact_details: u'Carrier pigeon only'
+ bug_tracker_type: 'Bugzilla'
+ contact_details: 'Carrier pigeon only'
has_lp_plugin: None
- name: u'mozilla.org'
- registrant_link: u'http://.../~name12'
- resource_type_link: u'http://.../#bug_tracker'
- self_link: u'http://.../bugs/bugtrackers/mozilla.org'
- summary: u'The Mozilla.org bug tracker is the grand-daddy of ...'
- title: u'The Mozilla.org Bug Tracker'
- watches_collection_link: u'http:.../bugs/bugtrackers/mozilla.org/watches'
- web_link: u'http://bugs.launchpad.test/bugs/bugtrackers/mozilla.org'
+ name: 'mozilla.org'
+ registrant_link: 'http://.../~name12'
+ resource_type_link: 'http://.../#bug_tracker'
+ self_link: 'http://.../bugs/bugtrackers/mozilla.org'
+ summary: 'The Mozilla.org bug tracker is the grand-daddy of ...'
+ title: 'The Mozilla.org Bug Tracker'
+ watches_collection_link: 'http:.../bugs/bugtrackers/mozilla.org/watches'
+ web_link: 'http://bugs.launchpad.test/bugs/bugtrackers/mozilla.org'
--- ...
A bug tracker can be retrieved using the bug tracker collection's
@@ -64,16 +64,16 @@ logged in user can call to create a bug tracker.
>>> bug_tracker = webservice.get('/bugs/bugtrackers/wombat').jsonBody()
>>> pprint_entry(bug_tracker)
active: True
- base_url: u'http://wombat.zz/'
+ base_url: 'http://wombat.zz/'
base_url_aliases: []
- bug_tracker_type: u'Bugzilla'
- contact_details: u'big-nose@xxxxxxxxx'
+ bug_tracker_type: 'Bugzilla'
+ contact_details: 'big-nose@xxxxxxxxx'
has_lp_plugin: False
- name: u'wombat'
- registrant_link: u'http://.../~salgado'
- resource_type_link: u'http://.../#bug_tracker'
- self_link: u'http://.../bugs/bugtrackers/wombat'
- summary: u'Wombat summary'
- title: u'Wombat title'
- watches_collection_link: u'http://.../bugs/bugtrackers/wombat/watches'
- web_link: u'http://bugs.launchpad.test/bugs/bugtrackers/wombat'
+ name: 'wombat'
+ registrant_link: 'http://.../~salgado'
+ resource_type_link: 'http://.../#bug_tracker'
+ self_link: 'http://.../bugs/bugtrackers/wombat'
+ summary: 'Wombat summary'
+ title: 'Wombat title'
+ watches_collection_link: 'http://.../bugs/bugtrackers/wombat/watches'
+ web_link: 'http://bugs.launchpad.test/bugs/bugtrackers/wombat'
diff --git a/lib/lp/bugs/stories/webservice/xx-bug.txt b/lib/lp/bugs/stories/webservice/xx-bug.txt
index a8f5d44..66250c7 100644
--- a/lib/lp/bugs/stories/webservice/xx-bug.txt
+++ b/lib/lp/bugs/stories/webservice/xx-bug.txt
@@ -14,44 +14,44 @@ Bugs are indexed by number beneath the top-level collection.
... pprint_collection, pprint_entry)
>>> bug_one = webservice.get("/bugs/1").jsonBody()
>>> pprint_entry(bug_one)
- activity_collection_link: u'http://.../bugs/1/activity'
- attachments_collection_link: u'http://.../bugs/1/attachments'
- bug_tasks_collection_link: u'http://.../bugs/1/bug_tasks'
- bug_watches_collection_link: u'http://.../bugs/1/bug_watches'
+ activity_collection_link: 'http://.../bugs/1/activity'
+ attachments_collection_link: 'http://.../bugs/1/attachments'
+ bug_tasks_collection_link: 'http://.../bugs/1/bug_tasks'
+ bug_watches_collection_link: 'http://.../bugs/1/bug_watches'
can_expire: False
- cves_collection_link: u'http://.../bugs/1/cves'
- date_created: u'2004-01-01T20:58:04.553583+00:00'
+ cves_collection_link: 'http://.../bugs/1/cves'
+ date_created: '2004-01-01T20:58:04.553583+00:00'
date_last_message: None
- date_last_updated: u'2006-05-19T06:37:40.344941+00:00'
+ date_last_updated: '2006-05-19T06:37:40.344941+00:00'
date_made_private: None
- description: u'Firefox needs to support embedded SVG...'
+ description: 'Firefox needs to support embedded SVG...'
duplicate_of_link: None
- duplicates_collection_link: u'http://.../bugs/1/duplicates'
+ duplicates_collection_link: 'http://.../bugs/1/duplicates'
heat: 0
id: 1
- information_type: u'Public'
+ information_type: 'Public'
latest_patch_uploaded: None
- linked_branches_collection_link: u'http://.../bugs/1/linked_branches'
+ linked_branches_collection_link: 'http://.../bugs/1/linked_branches'
message_count: 2
- messages_collection_link: u'http://.../bugs/1/messages'
+ messages_collection_link: 'http://.../bugs/1/messages'
name: None
number_of_duplicates: 0
other_users_affected_count_with_dupes: 0
- owner_link: u'http://.../~name12'
+ owner_link: 'http://.../~name12'
private: False
- resource_type_link: u'http://.../#bug'
+ resource_type_link: 'http://.../#bug'
security_related: False
- self_link: u'http://.../bugs/1'
- subscriptions_collection_link: u'http://.../bugs/1/subscriptions'
+ self_link: 'http://.../bugs/1'
+ subscriptions_collection_link: 'http://.../bugs/1/subscriptions'
tags: []
- title: u'Firefox does not support SVG'
- users_affected_collection_link: u'http://.../bugs/1/users_affected'
+ title: 'Firefox does not support SVG'
+ users_affected_collection_link: 'http://.../bugs/1/users_affected'
users_affected_count: 0
users_affected_count_with_dupes: 0
- users_affected_with_dupes_collection_link: u'http://.../bugs/1/users_affected_with_dupes'
- users_unaffected_collection_link: u'http://.../bugs/1/users_unaffected'
+ users_affected_with_dupes_collection_link: 'http://.../bugs/1/users_affected_with_dupes'
+ users_unaffected_collection_link: 'http://.../bugs/1/users_unaffected'
users_unaffected_count: 0
- web_link: u'http://bugs.../bugs/1'
+ web_link: 'http://bugs.../bugs/1'
who_made_private_link: None
Bugs have relationships to other bugs, like "duplicate_of".
@@ -231,15 +231,15 @@ Each bug has a collection of messages.
>>> messages = webservice.get("/bugs/5/messages").jsonBody()['entries']
>>> pprint_entry(messages[0])
bug_attachments_collection_link:
- u'http://.../firefox/+bug/5/comments/0/bug_attachments'
- content: u'All ways of downloading firefox should provide...'
- date_created: u'2005-01-14T17:27:03.702622+00:00'
- owner_link: u'http://.../~name12'
+ 'http://.../firefox/+bug/5/comments/0/bug_attachments'
+ content: 'All ways of downloading firefox should provide...'
+ date_created: '2005-01-14T17:27:03.702622+00:00'
+ owner_link: 'http://.../~name12'
parent_link: None
- resource_type_link: u'http://.../#message'
- self_link: u'http://.../firefox/+bug/5/comments/0'
- subject: u'Firefox install instructions should be complete'
- web_link: u'http://bugs.../firefox/+bug/5/comments/0'
+ resource_type_link: 'http://.../#message'
+ self_link: 'http://.../firefox/+bug/5/comments/0'
+ subject: 'Firefox install instructions should be complete'
+ web_link: 'http://bugs.../firefox/+bug/5/comments/0'
The messages are stored beneath the bug-specific collection. Their
URLs are based on their position with respect to the
@@ -279,12 +279,12 @@ We can add a new message to a bug by calling the newMessage method.
>>> pprint_entry(webservice.get("/firefox/+bug/5/comments/1").jsonBody())
bug_attachments_collection_link: ...
- content: u'This is a new message added through the webservice API.'
+ content: 'This is a new message added through the webservice API.'
...
- resource_type_link: u'http://api.launchpad.test/beta/#message'
- self_link: u'http://api.launchpad.test/beta/firefox/+bug/5/comments/1'
- subject: u'A new message'
- web_link: u'...'
+ resource_type_link: 'http://api.launchpad.test/beta/#message'
+ self_link: 'http://api.launchpad.test/beta/firefox/+bug/5/comments/1'
+ subject: 'A new message'
+ web_link: '...'
We don't have to submit a subject when we add a new message.
@@ -299,11 +299,11 @@ We don't have to submit a subject when we add a new message.
>>> pprint_entry(webservice.get("/firefox/+bug/5/comments/2").jsonBody())
bug_attachments_collection_link: ...
- content: u'This is a new message with no subject.'
+ content: 'This is a new message with no subject.'
...
- self_link: u'http://api.launchpad.test/beta/firefox/+bug/5/comments/2'
- subject: u'Re: Firefox install instructions should be complete'
- web_link: u'...'
+ self_link: 'http://api.launchpad.test/beta/firefox/+bug/5/comments/2'
+ subject: 'Re: Firefox install instructions should be complete'
+ web_link: '...'
Bug tasks
@@ -320,14 +320,14 @@ data in a bug task is derived from the bug.
>>> pprint_entry(bug_one_bugtasks[0])
assignee_link: None
- bug_link: u'http://.../bugs/1'
- bug_target_display_name: u'mozilla-firefox (Debian)'
- bug_target_name: u'mozilla-firefox (Debian)'
- bug_watch_link: u'http://.../bugs/1/+watch/8'
- date_assigned: u'2005-01-04T11:07:20.584746+00:00'
+ bug_link: 'http://.../bugs/1'
+ bug_target_display_name: 'mozilla-firefox (Debian)'
+ bug_target_name: 'mozilla-firefox (Debian)'
+ bug_watch_link: 'http://.../bugs/1/+watch/8'
+ date_assigned: '2005-01-04T11:07:20.584746+00:00'
date_closed: None
date_confirmed: None
- date_created: u'2004-01-04T03:49:22.790240+00:00'
+ date_created: '2004-01-04T03:49:22.790240+00:00'
date_fix_committed: None
date_fix_released: None
date_in_progress: None
@@ -335,18 +335,18 @@ data in a bug task is derived from the bug.
date_left_closed: None
date_left_new: None
date_triaged: None
- importance: u'Low'
+ importance: 'Low'
is_complete: False
milestone_link: None
- owner_link: u'http://.../~name12'
+ owner_link: 'http://.../~name12'
related_tasks_collection_link:
- u'http://api.../debian/+source/mozilla-firefox/+bug/1/related_tasks'
- resource_type_link: u'http://.../#bug_task'
- self_link: u'http://api.../debian/+source/mozilla-firefox/+bug/1'
- status: u'Confirmed'
- target_link: u'http://api.../debian/+source/mozilla-firefox'
- title: u'Bug #1 in mozilla-firefox (Debian): "Firefox does not support SVG"'
- web_link: u'http://bugs.../debian/+source/mozilla-firefox/+bug/1'
+ 'http://api.../debian/+source/mozilla-firefox/+bug/1/related_tasks'
+ resource_type_link: 'http://.../#bug_task'
+ self_link: 'http://api.../debian/+source/mozilla-firefox/+bug/1'
+ status: 'Confirmed'
+ target_link: 'http://api.../debian/+source/mozilla-firefox'
+ title: 'Bug #1 in mozilla-firefox (Debian): "Firefox does not support SVG"'
+ web_link: 'http://bugs.../debian/+source/mozilla-firefox/+bug/1'
The collection of bug tasks is not exposed as a resource:
@@ -651,17 +651,17 @@ But John, an unprivileged user, wants it fixed in Fooix 0.1.1.
start: 0
total_size: 1
---
- bug_link: u'http://.../bugs/...'
- date_created: u'...'
+ bug_link: 'http://.../bugs/...'
+ date_created: '...'
date_decided: None
decider_link: None
distroseries_link: None
- owner_link: u'http://.../~john'
- productseries_link: u'http://.../fooix/0.1'
- resource_type_link: u'http://.../#bug_nomination'
- self_link: u'http://.../bugs/.../nominations/...'
- status: u'Nominated'
- target_link: u'http://.../fooix/0.1'
+ owner_link: 'http://.../~john'
+ productseries_link: 'http://.../fooix/0.1'
+ resource_type_link: 'http://.../#bug_nomination'
+ self_link: 'http://.../bugs/.../nominations/...'
+ status: 'Nominated'
+ target_link: 'http://.../fooix/0.1'
---
@@ -706,17 +706,17 @@ John is disappointed to see that the nomination was declined.
start: 0
total_size: 1
---
- bug_link: u'http://.../bugs/...'
- date_created: u'...'
- date_decided: u'...'
- decider_link: u'http://.../~eric'
+ bug_link: 'http://.../bugs/...'
+ date_created: '...'
+ date_decided: '...'
+ decider_link: 'http://.../~eric'
distroseries_link: None
- owner_link: u'http://.../~john'
- productseries_link: u'http://.../fooix/0.1'
- resource_type_link: u'http://.../#bug_nomination'
- self_link: u'http://.../bugs/.../nominations/...'
- status: u'Declined'
- target_link: u'http://.../fooix/0.1'
+ owner_link: 'http://.../~john'
+ productseries_link: 'http://.../fooix/0.1'
+ resource_type_link: 'http://.../#bug_nomination'
+ self_link: 'http://.../bugs/.../nominations/...'
+ status: 'Declined'
+ target_link: 'http://.../fooix/0.1'
---
Eric changes his mind, and approves the nomination.
@@ -732,17 +732,17 @@ This marks the nomination as Approved, and creates a new task.
start: 0
total_size: 1
---
- bug_link: u'http://.../bugs/...'
- date_created: u'...'
- date_decided: u'...'
- decider_link: u'http://.../~eric'
+ bug_link: 'http://.../bugs/...'
+ date_created: '...'
+ date_decided: '...'
+ decider_link: 'http://.../~eric'
distroseries_link: None
- owner_link: u'http://.../~john'
- productseries_link: u'http://.../fooix/0.1'
- resource_type_link: u'http://.../#bug_nomination'
- self_link: u'http://.../bugs/.../nominations/...'
- status: u'Approved'
- target_link: u'http://.../fooix/0.1'
+ owner_link: 'http://.../~john'
+ productseries_link: 'http://.../fooix/0.1'
+ resource_type_link: 'http://.../#bug_nomination'
+ self_link: 'http://.../bugs/.../nominations/...'
+ status: 'Approved'
+ target_link: 'http://.../fooix/0.1'
---
>>> login('foo.bar@xxxxxxxxxxxxx')
@@ -814,19 +814,19 @@ We can get the collection of subscriptions to a bug.
>>> for entry in subscription_entries:
... pprint_entry(entry)
... print()
- bug_link: u'http://.../bugs/1'
- date_created: u'2006-10-16T18:31:43.156104+00:00'
- person_link: u'http://.../~name12'
- resource_type_link: u'http://.../#bug_subscription'
- self_link: u'http://.../bugs/1/+subscription/name12'
- subscribed_by_link: u'http://.../~janitor'
+ bug_link: 'http://.../bugs/1'
+ date_created: '2006-10-16T18:31:43.156104+00:00'
+ person_link: 'http://.../~name12'
+ resource_type_link: 'http://.../#bug_subscription'
+ self_link: 'http://.../bugs/1/+subscription/name12'
+ subscribed_by_link: 'http://.../~janitor'
<BLANKLINE>
- bug_link: u'http://.../bugs/1'
- date_created: u'2006-10-16T18:31:43.154816+00:00'
- person_link: u'http://.../~stevea'
- resource_type_link: u'http://.../#bug_subscription'
- self_link: u'http://.../bugs/1/+subscription/stevea'
- subscribed_by_link: u'http://.../~janitor'
+ bug_link: 'http://.../bugs/1'
+ date_created: '2006-10-16T18:31:43.154816+00:00'
+ person_link: 'http://.../~stevea'
+ resource_type_link: 'http://.../#bug_subscription'
+ self_link: 'http://.../bugs/1/+subscription/stevea'
+ subscribed_by_link: 'http://.../~janitor'
<BLANKLINE>
Each subscription can be accessed individually.
@@ -834,12 +834,12 @@ Each subscription can be accessed individually.
>>> subscription = webservice.get(
... subscription_entries[1]['self_link']).jsonBody()
>>> pprint_entry(subscription)
- bug_link: u'http://.../bugs/1'
- date_created: u'2006-10-16T18:31:43.154816+00:00'
- person_link: u'http://.../~stevea'
- resource_type_link: u'http://.../#bug_subscription'
- self_link: u'http://.../bugs/1/+subscription/stevea'
- subscribed_by_link: u'http://.../~janitor'
+ bug_link: 'http://.../bugs/1'
+ date_created: '2006-10-16T18:31:43.154816+00:00'
+ person_link: 'http://.../~stevea'
+ resource_type_link: 'http://.../#bug_subscription'
+ self_link: 'http://.../bugs/1/+subscription/stevea'
+ subscribed_by_link: 'http://.../~janitor'
Subscriptions can also be accessed anonymously.
@@ -854,7 +854,7 @@ We can also create new subscriptions.
... person=webservice.getAbsoluteUrl('/~cprov')).jsonBody()
>>> pprint_entry(new_subscription)
bug_link: ...
- self_link: u'http://.../bugs/1/+subscription/cprov'
+ self_link: 'http://.../bugs/1/+subscription/cprov'
...
An individual can only unsubscribe themselves. If the person argument is
@@ -874,13 +874,13 @@ BugNotificationLevel.
... person=webservice.getAbsoluteUrl('/~salgado'),
... level=u"Details", api_version="devel").jsonBody()
>>> pprint_entry(new_subscription)
- bug_link: u'.../bugs/1'
- bug_notification_level: u'Details'
- date_created: u'...'
- person_link: u'...'
- resource_type_link: u'...'
- self_link: u'...'
- subscribed_by_link: u'...'
+ bug_link: '.../bugs/1'
+ bug_notification_level: 'Details'
+ date_created: '...'
+ person_link: '...'
+ resource_type_link: '...'
+ self_link: '...'
+ subscribed_by_link: '...'
They can also update the subscription's bug_notification_level directly.
@@ -889,8 +889,8 @@ They can also update the subscription's bug_notification_level directly.
... webservice.patch(
... new_subscription['self_link'], 'application/json',
... dumps(patch), api_version="devel").jsonBody())
- bug_link: u'.../bugs/1'
- bug_notification_level: u'Lifecycle'...
+ bug_link: '.../bugs/1'
+ bug_notification_level: 'Lifecycle'...
If one person tries to unsubscribe another individual, the web
service will return an unauthorized error.
@@ -1046,23 +1046,23 @@ report described by the bugwatch.
... if bug_watch['remote_bug'] == u'2000']
>>> pprint_entry(bug_watch_2000)
- bug_link: u'http://.../bugs/1'
- bug_tasks_collection_link: u'http://.../bugs/1/+watch/2/bug_tasks'
- bug_tracker_link: u'http://.../bugs/bugtrackers/mozilla.org'
- date_created: u'2004-10-04T01:00:00+00:00'
- date_last_changed: u'2004-10-04T01:00:00+00:00'
- date_last_checked: u'2004-10-04T01:00:00+00:00'
+ bug_link: 'http://.../bugs/1'
+ bug_tasks_collection_link: 'http://.../bugs/1/+watch/2/bug_tasks'
+ bug_tracker_link: 'http://.../bugs/bugtrackers/mozilla.org'
+ date_created: '2004-10-04T01:00:00+00:00'
+ date_last_changed: '2004-10-04T01:00:00+00:00'
+ date_last_checked: '2004-10-04T01:00:00+00:00'
date_next_checked: None
last_error_type: None
- owner_link: u'http://.../~mark'
- remote_bug: u'2000'
- remote_importance: u''
- remote_status: u''
- resource_type_link: u'http://.../#bug_watch'
- self_link: u'http://.../bugs/1/+watch/2'
- title: u'The Mozilla.org Bug Tracker #2000'
- url: u'https://bugzilla.mozilla.org/show_bug.cgi?id=2000'
- web_link: u'http://bugs.../bugs/1/+watch/2'
+ owner_link: 'http://.../~mark'
+ remote_bug: '2000'
+ remote_importance: ''
+ remote_status: ''
+ resource_type_link: 'http://.../#bug_watch'
+ self_link: 'http://.../bugs/1/+watch/2'
+ title: 'The Mozilla.org Bug Tracker #2000'
+ url: 'https://bugzilla.mozilla.org/show_bug.cgi?id=2000'
+ web_link: 'http://bugs.../bugs/1/+watch/2'
>>> bug_watch = webservice.get(bug_watch_2000['self_link']).jsonBody()
>>> bug_watch == bug_watch_2000
@@ -1118,23 +1118,23 @@ Following the redirect, we can see the new bug watch:
>>> new_bug_watch_path = response.getHeader('Location')
>>> 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/.../bug_tasks'
- bug_tracker_link: u'http://.../bugs/bugtrackers/mozilla.org'
- date_created: u'...'
+ bug_link: 'http://.../bugs/1'
+ bug_tasks_collection_link: 'http://.../bugs/1/+watch/.../bug_tasks'
+ bug_tracker_link: 'http://.../bugs/bugtrackers/mozilla.org'
+ date_created: '...'
date_last_changed: None
date_last_checked: None
date_next_checked: None
last_error_type: None
- owner_link: u'http://.../~salgado'
- remote_bug: u'9876'
+ owner_link: 'http://.../~salgado'
+ remote_bug: '9876'
remote_importance: None
remote_status: None
- resource_type_link: u'http://.../#bug_watch'
- 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/...'
+ resource_type_link: 'http://.../#bug_watch'
+ self_link: 'http://.../bugs/1/+watch/...'
+ title: 'The Mozilla.org Bug Tracker #9876'
+ url: 'https://bugzilla.mozilla.org/show_bug.cgi?id=9876'
+ web_link: 'http://bugs.../bugs/1/+watch/...'
Bug Trackers
------------
@@ -1143,19 +1143,19 @@ Bug Trackers
>>> pprint_entry(bug_tracker)
active: True
- base_url: u'https://bugzilla.mozilla.org/'
+ base_url: 'https://bugzilla.mozilla.org/'
base_url_aliases: []
- bug_tracker_type: u'Bugzilla'
- contact_details: u'Carrier pigeon only'
+ bug_tracker_type: 'Bugzilla'
+ contact_details: 'Carrier pigeon only'
has_lp_plugin: None
- name: u'mozilla.org'
- registrant_link: u'http://.../~name12'
- resource_type_link: u'http://.../#bug_tracker'
- self_link: u'http://.../bugs/bugtrackers/mozilla.org'
- summary: u'The Mozilla.org bug tracker is the grand-daddy of bugzillas...'
- title: u'The Mozilla.org Bug Tracker'
- watches_collection_link: u'http://.../bugs/bugtrackers/mozilla.org/watches'
- web_link: u'http://bugs.../bugs/bugtrackers/mozilla.org'
+ name: 'mozilla.org'
+ registrant_link: 'http://.../~name12'
+ resource_type_link: 'http://.../#bug_tracker'
+ self_link: 'http://.../bugs/bugtrackers/mozilla.org'
+ summary: 'The Mozilla.org bug tracker is the grand-daddy of bugzillas...'
+ title: 'The Mozilla.org Bug Tracker'
+ watches_collection_link: 'http://.../bugs/bugtrackers/mozilla.org/watches'
+ web_link: 'http://bugs.../bugs/bugtrackers/mozilla.org'
We can change various aspects of bug trackers.
@@ -1197,19 +1197,19 @@ renamed bug tracker.
>>> bug_tracker = webservice.get(bug_tracker_path).jsonBody()
>>> pprint_entry(bug_tracker)
active: True
- base_url: u'http://bugs.example.com/'
+ base_url: 'http://bugs.example.com/'
base_url_aliases: [u'http://bugs.example.com/bugs/', u'http://www.example.com/bugtracker/']
- bug_tracker_type: u'Bugzilla'
- contact_details: u'bob@xxxxxxxxxxx'
+ bug_tracker_type: 'Bugzilla'
+ contact_details: 'bob@xxxxxxxxxxx'
has_lp_plugin: None
- name: u'bob'
- registrant_link: u'http://.../~name12'
- resource_type_link: u'http://.../#bug_tracker'
- self_link: u'http://.../bugs/bugtrackers/bob'
- summary: u'Where Bob files his bugs.'
- title: u"Bob's Tracker"
- watches_collection_link: u'http://.../bugs/bugtrackers/bob/watches'
- web_link: u'http://bugs.../bugs/bugtrackers/bob'
+ name: 'bob'
+ registrant_link: 'http://.../~name12'
+ resource_type_link: 'http://.../#bug_tracker'
+ self_link: 'http://.../bugs/bugtrackers/bob'
+ summary: 'Where Bob files his bugs.'
+ title: "Bob's Tracker"
+ watches_collection_link: 'http://.../bugs/bugtrackers/bob/watches'
+ web_link: 'http://bugs.../bugs/bugtrackers/bob'
Non-admins can't disable a bugtracker through the API.
@@ -1237,7 +1237,7 @@ Bug 1 has no attachments:
>>> attachments = webservice.get(
... bug_one['attachments_collection_link']).jsonBody()
>>> pprint_collection(attachments)
- resource_type_link: u'http://.../#bug_attachment-page-resource'
+ resource_type_link: 'http://.../#bug_attachment-page-resource'
start: 0
total_size: 0
---
@@ -1260,32 +1260,32 @@ Now, bug 1 has one attachment:
>>> attachments = webservice.get(
... bug_one['attachments_collection_link']).jsonBody()
>>> pprint_collection(attachments)
- resource_type_link: u'http://.../#bug_attachment-page-resource'
+ resource_type_link: 'http://.../#bug_attachment-page-resource'
start: 0
total_size: 1
---
- bug_link: u'http://.../bugs/1'
- data_link: u'http://.../bugs/1/+attachment/.../data'
- message_link: u'http://.../firefox/+bug/1/comments/2'
- resource_type_link: u'http://.../#bug_attachment'
- self_link: u'http://.../bugs/1/+attachment/...'
- title: u'numbers.txt'
- type: u'Unspecified'
- web_link: u'http://bugs.../bugs/1/+attachment/...'
+ bug_link: 'http://.../bugs/1'
+ data_link: 'http://.../bugs/1/+attachment/.../data'
+ message_link: 'http://.../firefox/+bug/1/comments/2'
+ resource_type_link: 'http://.../#bug_attachment'
+ self_link: 'http://.../bugs/1/+attachment/...'
+ title: 'numbers.txt'
+ type: 'Unspecified'
+ web_link: 'http://bugs.../bugs/1/+attachment/...'
---
The attachment can be fetched directly:
>>> [attachment] = attachments['entries']
>>> pprint_entry(webservice.get(attachment['self_link']).jsonBody())
- bug_link: u'http://.../bugs/1'
- data_link: u'http://.../bugs/1/+attachment/.../data'
- message_link: u'http://.../firefox/+bug/1/comments/2'
- resource_type_link: u'http://.../#bug_attachment'
- self_link: u'http://.../bugs/1/+attachment/...'
- title: u'numbers.txt'
- type: u'Unspecified'
- web_link: u'http://bugs.../bugs/1/+attachment/...'
+ bug_link: 'http://.../bugs/1'
+ data_link: 'http://.../bugs/1/+attachment/.../data'
+ message_link: 'http://.../firefox/+bug/1/comments/2'
+ resource_type_link: 'http://.../#bug_attachment'
+ self_link: 'http://.../bugs/1/+attachment/...'
+ title: 'numbers.txt'
+ type: 'Unspecified'
+ web_link: 'http://bugs.../bugs/1/+attachment/...'
Fetching the data actually yields a redirect to the Librarian, which
we must follow to download the data.
@@ -1322,15 +1322,15 @@ attachment. This is where our comment is recorded.
>>> message = webservice.get(attachment['message_link']).jsonBody()
>>> pprint_entry(message)
- bug_attachments_collection_link: u'http://.../firefox/+bug/1/comments/2/bug_attachments'
- content: u'The numbers you asked for.'
- date_created: u'...'
- owner_link: u'http://.../~salgado'
+ bug_attachments_collection_link: 'http://.../firefox/+bug/1/comments/2/bug_attachments'
+ content: 'The numbers you asked for.'
+ date_created: '...'
+ owner_link: 'http://.../~salgado'
parent_link: None
- resource_type_link: u'http://.../#message'
- self_link: u'http://.../firefox/+bug/1/comments/2'
- subject: u'Re: Firefox does not support SVG'
- web_link: u'http://bugs.../firefox/+bug/1/comments/2'
+ resource_type_link: 'http://.../#message'
+ self_link: 'http://.../firefox/+bug/1/comments/2'
+ subject: 'Re: Firefox does not support SVG'
+ web_link: 'http://bugs.../firefox/+bug/1/comments/2'
The message also links back to the attachments that were uploaded at
the same time.
@@ -1338,7 +1338,7 @@ the same time.
>>> attachments = webservice.get(
... message['bug_attachments_collection_link']).jsonBody()
>>> pprint_collection(attachments)
- resource_type_link: u'http://.../#bug_attachment-page-resource'
+ resource_type_link: 'http://.../#bug_attachment-page-resource'
start: 0
total_size: 1
...
@@ -1373,7 +1373,7 @@ But we can remove the attachment altogether.
>>> attachments = webservice.get(
... bug_one['attachments_collection_link']).jsonBody()
>>> pprint_collection(attachments)
- resource_type_link: u'http://api.launchpad.test/beta/#bug_attachment-page-resource'
+ resource_type_link: 'http://api.launchpad.test/beta/#bug_attachment-page-resource'
start: 0
total_size: 0
---
@@ -1394,15 +1394,15 @@ bug tasks for the target.
total_size: 5
---
...
- target_link: u'http://api.launchpad.test/beta/firefox'
+ target_link: 'http://api.launchpad.test/beta/firefox'
...
- target_link: u'http://api.launchpad.test/beta/firefox'
+ target_link: 'http://api.launchpad.test/beta/firefox'
...
- target_link: u'http://api.launchpad.test/beta/firefox'
+ target_link: 'http://api.launchpad.test/beta/firefox'
...
- target_link: u'http://api.launchpad.test/beta/firefox'
+ target_link: 'http://api.launchpad.test/beta/firefox'
...
- target_link: u'http://api.launchpad.test/beta/firefox'
+ target_link: 'http://api.launchpad.test/beta/firefox'
...
Some parameters accept lists of values, just like when searching from
@@ -1416,15 +1416,15 @@ accept many values and return only tasks with these values.
total_size: 2
---
...
- importance: u'Critical'
+ importance: 'Critical'
...
- self_link: u'http://api.launchpad.test/beta/firefox/+bug/5'
+ self_link: 'http://api.launchpad.test/beta/firefox/+bug/5'
...
---
...
- importance: u'Low'
+ importance: 'Low'
...
- self_link: u'http://api.launchpad.test/beta/firefox/+bug/1'
+ self_link: 'http://api.launchpad.test/beta/firefox/+bug/1'
...
The tags parameter also accepts a list of values. By default, it
@@ -1437,21 +1437,21 @@ searches for bugs with any of the given tags.
total_size: 3
---
...
- bug_link: u'http://.../bugs/9'
+ bug_link: 'http://.../bugs/9'
...
- self_link: u'http://.../ubuntu/+source/thunderbird/+bug/9'
+ self_link: 'http://.../ubuntu/+source/thunderbird/+bug/9'
...
---
...
- bug_link: u'http://.../bugs/10'
+ bug_link: 'http://.../bugs/10'
...
- self_link: u'http://.../ubuntu/+source/linux-source-2.6.15/+bug/10'
+ self_link: 'http://.../ubuntu/+source/linux-source-2.6.15/+bug/10'
...
---
...
- bug_link: u'http://.../bugs/2'
+ bug_link: 'http://.../bugs/2'
...
- self_link: u'http://.../ubuntu/+bug/2'
+ self_link: 'http://.../ubuntu/+bug/2'
...
It can be used for searching for bugs with all of the given tags by
@@ -1587,11 +1587,11 @@ bugs:
total_size: 2
---
...
- owner_link: u'http://api.launchpad.test/beta/~testuser1'
+ owner_link: 'http://api.launchpad.test/beta/~testuser1'
...
---
...
- owner_link: u'http://api.launchpad.test/beta/~testuser1'
+ owner_link: 'http://api.launchpad.test/beta/~testuser1'
...
`testuser2` is subscribed to `testbug2`, so this bug is related to this
@@ -1667,11 +1667,11 @@ It is possible to mark a bug as affecting the user using the web service.
>>> pprint_collection(webservice.get(webservice.get(
... bug_one['self_link']).jsonBody()[
... 'users_affected_collection_link']).jsonBody())
- resource_type_link: u'http://api.launchpad.test/beta/#person-page-resource'
+ resource_type_link: 'http://api.launchpad.test/beta/#person-page-resource'
start: 0
total_size: 1
...
- self_link: u'http://api.launchpad.test/beta/~salgado'
+ self_link: 'http://api.launchpad.test/beta/~salgado'
...
>>> webservice.named_post(
@@ -1691,38 +1691,38 @@ The collection of all CVEs is available at the top level.
>>> cves = webservice.get("/bugs/cve").jsonBody()
>>> pprint_collection(cves)
- next_collection_link: u'http://.../bugs/cve?ws.size=5&memo=5&ws.start=5'
- resource_type_link: u'http://.../#cves'
+ next_collection_link: 'http://.../bugs/cve?ws.size=5&memo=5&ws.start=5'
+ resource_type_link: 'http://.../#cves'
start: 0
total_size: 10
---
- bugs_collection_link: u'http://.../bugs/cve/2005-2737/bugs'
- date_created: u'2005-09-13T14:05:17.043865+00:00'
- date_modified: u'2005-09-13T14:05:17.043865+00:00'
- description: u'Cross-site scripting (XSS) vulnerability...'
- display_name: u'CVE-2005-2737'
- resource_type_link: u'http://.../#cve'
- self_link: u'http://.../bugs/cve/2005-2737'
- sequence: u'2005-2737'
- status: u'Candidate'
- title: u'CVE-2005-2737 (Candidate)'
- url: u'https://cve.mitre.org/cgi-bin/cvename.cgi?name=2005-2737'
- web_link: u'http://bugs.launchpad.test/bugs/cve/2005-2737'
+ bugs_collection_link: 'http://.../bugs/cve/2005-2737/bugs'
+ date_created: '2005-09-13T14:05:17.043865+00:00'
+ date_modified: '2005-09-13T14:05:17.043865+00:00'
+ description: 'Cross-site scripting (XSS) vulnerability...'
+ display_name: 'CVE-2005-2737'
+ resource_type_link: 'http://.../#cve'
+ self_link: 'http://.../bugs/cve/2005-2737'
+ sequence: '2005-2737'
+ status: 'Candidate'
+ title: 'CVE-2005-2737 (Candidate)'
+ url: 'https://cve.mitre.org/cgi-bin/cvename.cgi?name=2005-2737'
+ web_link: 'http://bugs.launchpad.test/bugs/cve/2005-2737'
---
...
- self_link: u'http://.../bugs/cve/2005-2736'
+ self_link: 'http://.../bugs/cve/2005-2736'
...
---
...
- self_link: u'http://.../bugs/cve/2005-2735'
+ self_link: 'http://.../bugs/cve/2005-2735'
...
---
...
- self_link: u'http://.../bugs/cve/2005-2734'
+ self_link: 'http://.../bugs/cve/2005-2734'
...
---
...
- self_link: u'http://.../bugs/cve/2005-2733'
+ self_link: 'http://.../bugs/cve/2005-2733'
...
And for every bug we can look at the CVEs linked to it.
@@ -1730,22 +1730,22 @@ And for every bug we can look at the CVEs linked to it.
>>> bug_one_cves_url = bug_one['cves_collection_link']
>>> bug_one_cves = webservice.get(bug_one_cves_url).jsonBody()
>>> pprint_collection(bug_one_cves)
- resource_type_link: u'http://.../#cve-page-resource'
+ resource_type_link: 'http://.../#cve-page-resource'
start: 0
total_size: 1
---
- bugs_collection_link: u'http://.../bugs/cve/1999-8979/bugs'
- date_created: u'2005-09-07T19:00:32.944561+00:00'
- date_modified: u'2005-09-13T14:00:03.508959+00:00'
- description: u'Firefox crashes all the time'
- display_name: u'CVE-1999-8979'
- resource_type_link: u'http://.../#cve'
- self_link: u'http://.../bugs/cve/1999-8979'
- sequence: u'1999-8979'
- status: u'Entry'
- title: u'CVE-1999-8979 (Entry)'
- url: u'https://cve.mitre.org/cgi-bin/cvename.cgi?name=1999-8979'
- web_link: u'http://bugs.launchpad.test/bugs/cve/1999-8979'
+ bugs_collection_link: 'http://.../bugs/cve/1999-8979/bugs'
+ date_created: '2005-09-07T19:00:32.944561+00:00'
+ date_modified: '2005-09-13T14:00:03.508959+00:00'
+ description: 'Firefox crashes all the time'
+ display_name: 'CVE-1999-8979'
+ resource_type_link: 'http://.../#cve'
+ self_link: 'http://.../bugs/cve/1999-8979'
+ sequence: '1999-8979'
+ status: 'Entry'
+ title: 'CVE-1999-8979 (Entry)'
+ url: 'https://cve.mitre.org/cgi-bin/cvename.cgi?name=1999-8979'
+ web_link: 'http://bugs.launchpad.test/bugs/cve/1999-8979'
---
For every CVE we can also look at the bugs linked to it.
@@ -1764,7 +1764,7 @@ Unlink CVEs from that bug.
... cve='http://api.launchpad.test/beta/bugs/cve/1999-8979'))
HTTP/1.1 200 Ok...
>>> pprint_collection(webservice.get(bug_one_cves_url).jsonBody())
- resource_type_link: u'http://.../#cve-page-resource'
+ resource_type_link: 'http://.../#cve-page-resource'
start: 0
total_size: 0
---
@@ -1776,19 +1776,19 @@ And link new CVEs to the bug.
... cve='http://api.launchpad.test/beta/bugs/cve/2005-2733'))
HTTP/1.1 200 Ok...
>>> pprint_collection(webservice.get(bug_one_cves_url).jsonBody())
- resource_type_link: u'http://.../#cve-page-resource'
+ resource_type_link: 'http://.../#cve-page-resource'
start: 0
total_size: 1
---
...
- self_link: u'http://.../bugs/cve/2005-2733'
+ self_link: 'http://.../bugs/cve/2005-2733'
...
Add a new task to the bug.
>>> bugtasks_url = bug_one['bug_tasks_collection_link']
>>> pprint_collection(webservice.get(bugtasks_url).jsonBody())
- resource_type_link: u'http://.../#bug_task-page-resource'
+ resource_type_link: 'http://.../#bug_task-page-resource'
start: 0
total_size: 3
...
@@ -1801,7 +1801,7 @@ Add a new task to the bug.
>>> bugtasks_url = bug_one['bug_tasks_collection_link']
>>> pprint_collection(webservice.get(bugtasks_url).jsonBody())
- resource_type_link: u'http://.../#bug_task-page-resource'
+ resource_type_link: 'http://.../#bug_task-page-resource'
start: 0
total_size: 4
...
@@ -1816,19 +1816,19 @@ For every bug we can look at the branches linked to it.
>>> bug_four_branches_url = bug_four['linked_branches_collection_link']
>>> bug_four_branches = webservice.get(bug_four_branches_url).jsonBody()
>>> pprint_collection(bug_four_branches)
- resource_type_link: u'http://.../#bug_branch-page-resource'
+ resource_type_link: 'http://.../#bug_branch-page-resource'
start: 0
total_size: 2
---
- branch_link: u'http://.../~mark/firefox/release-0.9.2'
- bug_link: u'http://.../bugs/4'
- resource_type_link: u'http://.../#bug_branch'
- self_link: u'http://.../~mark/firefox/release-0.9.2/+bug/4'
+ branch_link: 'http://.../~mark/firefox/release-0.9.2'
+ bug_link: 'http://.../bugs/4'
+ resource_type_link: 'http://.../#bug_branch'
+ self_link: 'http://.../~mark/firefox/release-0.9.2/+bug/4'
---
- branch_link: u'http://.../~name12/firefox/main'
- bug_link: u'http://.../bugs/4'
- resource_type_link: u'http://.../beta/#bug_branch'
- self_link: u'http://.../~name12/firefox/main/+bug/4'
+ branch_link: 'http://.../~name12/firefox/main'
+ bug_link: 'http://.../bugs/4'
+ resource_type_link: 'http://.../beta/#bug_branch'
+ self_link: 'http://.../~name12/firefox/main/+bug/4'
---
For every branch we can also look at the bugs linked to it.
@@ -1892,23 +1892,23 @@ Each bug has a collection of activities that have taken place with it.
>>> activity = anon_webservice.get(
... bug_one['activity_collection_link']).jsonBody()
>>> pprint_collection(activity)
- next_collection_link: u'http://.../bugs/1/activity?ws.size=5&memo=5&ws.start=5'
- resource_type_link: u'http://.../#bug_activity-page-resource'
+ next_collection_link: 'http://.../bugs/1/activity?ws.size=5&memo=5&ws.start=5'
+ resource_type_link: 'http://.../#bug_activity-page-resource'
start: 0
total_size: 24
...
- message: u"Decided problem wasn't silly after all"
+ message: "Decided problem wasn't silly after all"
...
>>> bug_nine_activity = webservice.get(
... "/bugs/9/activity").jsonBody()
>>> pprint_entry(bug_nine_activity['entries'][1])
- bug_link: u'http://.../bugs/9'
- datechanged: u'2006-02-23T16:42:40.288553+00:00'
+ bug_link: 'http://.../bugs/9'
+ datechanged: '2006-02-23T16:42:40.288553+00:00'
message: None
- newvalue: u'Confirmed'
- oldvalue: u'Unconfirmed'
- person_link: u'http://.../~name12'
- resource_type_link: u'http://.../#bug_activity'
- self_link: u'http://.../bugs/9/activity'
- whatchanged: u'thunderbird: status'
+ newvalue: 'Confirmed'
+ oldvalue: 'Unconfirmed'
+ person_link: 'http://.../~name12'
+ resource_type_link: 'http://.../#bug_activity'
+ self_link: 'http://.../bugs/9/activity'
+ whatchanged: 'thunderbird: status'
diff --git a/lib/lp/code/stories/webservice/xx-branch-links.txt b/lib/lp/code/stories/webservice/xx-branch-links.txt
index abbd9a0..81a5a15 100644
--- a/lib/lp/code/stories/webservice/xx-branch-links.txt
+++ b/lib/lp/code/stories/webservice/xx-branch-links.txt
@@ -59,11 +59,11 @@ A spec can be linked to a branch through the API.
... robots['spec_links_collection_link']).jsonBody()
>>> spec_link = spec_links['entries'][0]
>>> pprint_entry(spec_link)
- branch_link: u'http://.../~prime/cybertron/robots'
- registrant_link: u'http://.../~salgado'
- resource_type_link: u'http://.../#specification_branch'
- self_link: u'http://.../product-name.../+spec/name.../+branch/prime/cybertron/robots'
- specification_link: u'http://.../product-name.../+spec/name...'
+ branch_link: 'http://.../~prime/cybertron/robots'
+ registrant_link: 'http://.../~salgado'
+ resource_type_link: 'http://.../#specification_branch'
+ self_link: 'http://.../product-name.../+spec/name.../+branch/prime/cybertron/robots'
+ specification_link: 'http://.../product-name.../+spec/name...'
If it turns out that the branch has no connection with the spec, it can be
diff --git a/lib/lp/code/stories/webservice/xx-branch.txt b/lib/lp/code/stories/webservice/xx-branch.txt
index 18c3ea0..299b9ad 100644
--- a/lib/lp/code/stories/webservice/xx-branch.txt
+++ b/lib/lp/code/stories/webservice/xx-branch.txt
@@ -106,45 +106,45 @@ time goes on.
>>> from lazr.restful.testing.webservice import pprint_entry
>>> pprint_entry(fooix_trunk)
branch_format: None
- branch_type: u'Hosted'
- bzr_identity: u'lp://dev/~eric/fooix/trunk'
+ branch_type: 'Hosted'
+ bzr_identity: 'lp://dev/~eric/fooix/trunk'
code_import_link: None
control_format: None
- date_created: u'2009-01-01T00:00:00+00:00'
- date_last_modified: u'2009-01-01T00:00:00+00:00'
- dependent_branches_collection_link: u'.../~eric/fooix/trunk/dependent_branches'
+ date_created: '2009-01-01T00:00:00+00:00'
+ date_last_modified: '2009-01-01T00:00:00+00:00'
+ dependent_branches_collection_link: '.../~eric/fooix/trunk/dependent_branches'
description: None
- display_name: u'lp://dev/~eric/fooix/trunk'
+ display_name: 'lp://dev/~eric/fooix/trunk'
explicitly_private: False
- information_type: u'Public'
- landing_candidates_collection_link: u'.../~eric/fooix/trunk/landing_candidates'
- landing_targets_collection_link: u'.../~eric/fooix/trunk/landing_targets'
+ information_type: 'Public'
+ landing_candidates_collection_link: '.../~eric/fooix/trunk/landing_candidates'
+ landing_targets_collection_link: '.../~eric/fooix/trunk/landing_targets'
last_mirror_attempt: None
last_mirrored: None
last_scanned: None
last_scanned_id: None
- lifecycle_status: u'Development'
- linked_bugs_collection_link: u'http://.../~eric/fooix/trunk/linked_bugs'
+ lifecycle_status: 'Development'
+ linked_bugs_collection_link: 'http://.../~eric/fooix/trunk/linked_bugs'
mirror_status_message: None
- name: u'trunk'
- owner_link: u'.../~eric'
+ name: 'trunk'
+ owner_link: '.../~eric'
private: False
- project_link: u'.../fooix'
- recipes_collection_link: u'http://.../~eric/fooix/trunk/recipes'
- registrant_link: u'.../~eric'
+ project_link: '.../fooix'
+ recipes_collection_link: 'http://.../~eric/fooix/trunk/recipes'
+ registrant_link: '.../~eric'
repository_format: None
- resource_type_link: u'.../#branch'
+ resource_type_link: '.../#branch'
reviewer_link: None
revision_count: 0
- self_link: u'.../~eric/fooix/trunk'
+ self_link: '.../~eric/fooix/trunk'
sourcepackage_link: None
- spec_links_collection_link: u'.../~eric/fooix/trunk/spec_links'
- subscribers_collection_link: u'http://.../~eric/fooix/trunk/subscribers'
- subscriptions_collection_link: u'http://.../~eric/fooix/trunk/subscriptions'
- unique_name: u'~eric/fooix/trunk'
+ spec_links_collection_link: '.../~eric/fooix/trunk/spec_links'
+ subscribers_collection_link: 'http://.../~eric/fooix/trunk/subscribers'
+ subscriptions_collection_link: 'http://.../~eric/fooix/trunk/subscriptions'
+ unique_name: '~eric/fooix/trunk'
url: None
- web_link: u'http://code.../~eric/fooix/trunk'
- webhooks_collection_link: u'http://.../~eric/fooix/trunk/webhooks'
+ web_link: 'http://code.../~eric/fooix/trunk'
+ webhooks_collection_link: 'http://.../~eric/fooix/trunk/webhooks'
whiteboard: None
There is a branch merge proposal with Fooix trunk as the target branch, so it
diff --git a/lib/lp/code/stories/webservice/xx-branchmergeproposal.txt b/lib/lp/code/stories/webservice/xx-branchmergeproposal.txt
index 98483a4..32f0373 100644
--- a/lib/lp/code/stories/webservice/xx-branchmergeproposal.txt
+++ b/lib/lp/code/stories/webservice/xx-branchmergeproposal.txt
@@ -44,44 +44,44 @@ Branch merge proposals can be created through the API.
>>> bmp_url = bmp_result.getHeader('Location')
>>> bmp = registrant_webservice.get(bmp_url).jsonBody()
>>> pprint_entry(bmp)
- address: u'mp+...@xxxxxxxxxxxxxxxxxxx'
+ address: 'mp+...@xxxxxxxxxxxxxxxxxxx'
all_comments_collection_link:
- u'http://api.launchpad.test/devel/~.../+merge/.../all_comments'
+ 'http://api.launchpad.test/devel/~.../+merge/.../all_comments'
bugs_collection_link:
- u'http://api.launchpad.test/devel/~.../+merge/.../bugs'
- commit_message: u'It was merged!\n'
- date_created: u'...'
+ 'http://api.launchpad.test/devel/~.../+merge/.../bugs'
+ commit_message: 'It was merged!\n'
+ date_created: '...'
date_merged: None
- date_review_requested: u'...'
+ date_review_requested: '...'
date_reviewed: None
- description: u'Merge\nit!'
+ description: 'Merge\nit!'
merge_reporter_link: None
merged_revision_id: None
merged_revno: None
- prerequisite_branch_link: u'http://api.launchpad.test/devel/~...'
+ prerequisite_branch_link: 'http://api.launchpad.test/devel/~...'
prerequisite_git_path: None
prerequisite_git_repository_link: None
preview_diff_link: None
- preview_diffs_collection_link: u'http://.../preview_diffs'
+ preview_diffs_collection_link: 'http://.../preview_diffs'
private: False
- queue_status: u'Needs review'
- registrant_link: u'http://api.launchpad.test/devel/~person-name...'
+ queue_status: 'Needs review'
+ registrant_link: 'http://api.launchpad.test/devel/~person-name...'
resource_type_link:
- u'http://api.launchpad.test/devel/#branch_merge_proposal'
+ 'http://api.launchpad.test/devel/#branch_merge_proposal'
reviewed_revid: None
reviewer_link: None
- self_link: u'http://api.launchpad.test/devel/~.../+merge/...'
- source_branch_link: u'http://api.launchpad.test/devel/~...'
+ self_link: 'http://api.launchpad.test/devel/~.../+merge/...'
+ source_branch_link: 'http://api.launchpad.test/devel/~...'
source_git_path: None
source_git_repository_link: None
superseded_by_link: None
supersedes_link: None
- target_branch_link: u'http://api.launchpad.test/devel/~...'
+ target_branch_link: 'http://api.launchpad.test/devel/~...'
target_git_path: None
target_git_repository_link: None
votes_collection_link:
- u'http://api.launchpad.test/devel/~.../+merge/.../votes'
- web_link: u'http://code.../~.../+merge/...'
+ 'http://api.launchpad.test/devel/~.../+merge/.../votes'
+ web_link: 'http://code.../~.../+merge/...'
If we try and create the merge proposal again, we should get a ValueError.
@@ -101,15 +101,15 @@ Our review request is listed in the votes collection.
>>> votes = webservice.get(
... bmp['votes_collection_link']).jsonBody()
>>> pprint_entry(votes['entries'][0])
- branch_merge_proposal_link: u'http://api.launchpad.test/devel/~.../+merge/...'
+ branch_merge_proposal_link: 'http://api.launchpad.test/devel/~.../+merge/...'
comment_link: None
- date_created: u'...'
+ date_created: '...'
is_pending: True
- registrant_link: u'http://api.launchpad.test/devel/~person-name...'
- resource_type_link: u'http://api.launchpad.test/devel/#code_review_vote_reference'
- review_type: u'green'
- reviewer_link: u'http://api.launchpad.test/devel/~person-name...'
- self_link: u'http://api.launchpad.test/devel/~...'
+ registrant_link: 'http://api.launchpad.test/devel/~person-name...'
+ resource_type_link: 'http://api.launchpad.test/devel/#code_review_vote_reference'
+ review_type: 'green'
+ reviewer_link: 'http://api.launchpad.test/devel/~person-name...'
+ self_link: 'http://api.launchpad.test/devel/~...'
== Get an existing merge proposal ==
@@ -149,10 +149,10 @@ We use the webservice as an unrelated, unprivileged user.
>>> merge_proposal = webservice.get(proposal_url).jsonBody()
>>> pprint_entry(merge_proposal)
- address: u'mp+...@xxxxxxxxxxxxxxxxxxx'
+ address: 'mp+...@xxxxxxxxxxxxxxxxxxx'
all_comments_collection_link:
- u'http://.../~source/fooix/fix-it/+merge/.../all_comments'
- bugs_collection_link: u'http://.../~source/fooix/fix-it/+merge/.../bugs'
+ 'http://.../~source/fooix/fix-it/+merge/.../all_comments'
+ bugs_collection_link: 'http://.../~source/fooix/fix-it/+merge/.../bugs'
commit_message: None
date_created: ...
date_merged: None
@@ -166,24 +166,24 @@ We use the webservice as an unrelated, unprivileged user.
prerequisite_git_path: None
prerequisite_git_repository_link: None
preview_diff_link: None
- preview_diffs_collection_link: u'http://.../preview_diffs'
+ preview_diffs_collection_link: 'http://.../preview_diffs'
private: False
- queue_status: u'Work in progress'
- registrant_link: u'http://.../~person-name...'
- resource_type_link: u'http://.../#branch_merge_proposal'
+ queue_status: 'Work in progress'
+ registrant_link: 'http://.../~person-name...'
+ resource_type_link: 'http://.../#branch_merge_proposal'
reviewed_revid: None
reviewer_link: None
- self_link: u'http://.../~source/fooix/fix-it/+merge/...'
- source_branch_link: u'http://.../~source/fooix/fix-it'
+ self_link: 'http://.../~source/fooix/fix-it/+merge/...'
+ source_branch_link: 'http://.../~source/fooix/fix-it'
source_git_path: None
source_git_repository_link: None
superseded_by_link: None
supersedes_link: None
- target_branch_link: u'http://.../~target/fooix/trunk'
+ target_branch_link: 'http://.../~target/fooix/trunk'
target_git_path: None
target_git_repository_link: None
- votes_collection_link: u'http://.../~source/fooix/fix-it/+merge/.../votes'
- web_link: u'http://code.../~source/fooix/fix-it/+merge/...'
+ votes_collection_link: 'http://.../~source/fooix/fix-it/+merge/.../votes'
+ web_link: 'http://code.../~source/fooix/fix-it/+merge/...'
== Read the comments ==
@@ -195,36 +195,36 @@ The comments on a branch merge proposal are exposed through the API.
>>> print(len(all_comments['entries']))
2
>>> pprint_entry(all_comments['entries'][0])
- as_quoted_email: u'> This is great work'
- author_link: u'http://api.launchpad.test/devel/~...'
- branch_merge_proposal_link: u'http://.../~source/fooix/fix-it/+merge/...'
- date_created: u'...'
+ as_quoted_email: '> This is great work'
+ author_link: 'http://api.launchpad.test/devel/~...'
+ branch_merge_proposal_link: 'http://.../~source/fooix/fix-it/+merge/...'
+ date_created: '...'
id: ...
- message_body: u'This is great work'
- resource_type_link: u'http://.../#code_review_comment'
- self_link: u'http://.../~source/fooix/fix-it/+merge/.../comments/...'
- title: u'Comment on proposed merge of lp://dev/~source/fooix/fix-it into lp://dev/~target/fooix/trunk'
- vote: u'Approve'
- vote_tag: u'code'
- web_link: u'http://code.../~source/fooix/fix-it/+merge/.../comments/...'
+ message_body: 'This is great work'
+ resource_type_link: 'http://.../#code_review_comment'
+ self_link: 'http://.../~source/fooix/fix-it/+merge/.../comments/...'
+ title: 'Comment on proposed merge of lp://dev/~source/fooix/fix-it into lp://dev/~target/fooix/trunk'
+ vote: 'Approve'
+ vote_tag: 'code'
+ web_link: 'http://code.../~source/fooix/fix-it/+merge/.../comments/...'
>>> comment_2_id = all_comments['entries'][1]['id']
>>> comment_2 = webservice.named_get(
... merge_proposal['self_link'], 'getComment',
... id=comment_2_id).jsonBody()
>>> pprint_entry(comment_2)
- as_quoted_email: u'> This is mediocre work.'
- author_link: u'http://api.launchpad.test/devel/~...'
- branch_merge_proposal_link: u'http://.../~source/fooix/fix-it/+merge/...'
- date_created: u'...'
+ as_quoted_email: '> This is mediocre work.'
+ author_link: 'http://api.launchpad.test/devel/~...'
+ branch_merge_proposal_link: 'http://.../~source/fooix/fix-it/+merge/...'
+ date_created: '...'
id: ...
- message_body: u'This is mediocre work.'
- resource_type_link: u'http://.../#code_review_comment'
- self_link: u'http://.../~source/fooix/fix-it/+merge/.../comments/...'
+ message_body: 'This is mediocre work.'
+ resource_type_link: 'http://.../#code_review_comment'
+ self_link: 'http://.../~source/fooix/fix-it/+merge/.../comments/...'
title: ...
- vote: u'Abstain'
+ vote: 'Abstain'
vote_tag: None
- web_link: u'http://code.../~source/fooix/fix-it/+merge/.../comments/...'
+ web_link: 'http://code.../~source/fooix/fix-it/+merge/.../comments/...'
== Check the votes ==
@@ -236,15 +236,15 @@ The votes on a branch merge proposal can be checked through the API.
>>> print(len(votes))
2
>>> pprint_entry(votes[0])
- branch_merge_proposal_link: u'http://.../~source/fooix/fix-it/+merge/...'
- comment_link: u'http://.../~source/fooix/fix-it/+merge/.../comments/...'
- date_created: u'...'
+ branch_merge_proposal_link: 'http://.../~source/fooix/fix-it/+merge/...'
+ comment_link: 'http://.../~source/fooix/fix-it/+merge/.../comments/...'
+ date_created: '...'
is_pending: False
- registrant_link: u'http://.../~person-name...'
- resource_type_link: u'http://.../#code_review_vote_reference'
- review_type: u'code'
- reviewer_link: u'http://.../~person-name...'
- self_link: u'http://.../~source/fooix/fix-it/+merge/.../+review/...'
+ registrant_link: 'http://.../~person-name...'
+ resource_type_link: 'http://.../#code_review_vote_reference'
+ review_type: 'code'
+ reviewer_link: 'http://.../~person-name...'
+ self_link: 'http://.../~source/fooix/fix-it/+merge/.../+review/...'
== Performing a Review ==
@@ -264,15 +264,15 @@ A review can be requested of the person 'target'.
HTTP/1.1 200 Ok ...
>>> reviewer_entry = reviewer.jsonBody()
>>> pprint_entry(reviewer_entry)
- branch_merge_proposal_link: u'http://.../~source/fooix/fix-it/+merge/...'
+ branch_merge_proposal_link: 'http://.../~source/fooix/fix-it/+merge/...'
comment_link: None
- date_created: u'...'
+ date_created: '...'
is_pending: True
- registrant_link: u'http://.../~target'
- resource_type_link: u'http://.../#code_review_vote_reference'
- review_type: u'code'
- reviewer_link: u'http://.../~target'
- self_link: u'http://.../~source/fooix/fix-it/+merge/.../+review/...'
+ registrant_link: 'http://.../~target'
+ resource_type_link: 'http://.../#code_review_vote_reference'
+ review_type: 'code'
+ reviewer_link: 'http://.../~target'
+ self_link: 'http://.../~source/fooix/fix-it/+merge/.../+review/...'
>>> vote = reviewer_webservice.get(reviewer_entry['self_link'])
>>> print(vote)
@@ -287,18 +287,18 @@ Now the code review should be made.
>>> comment_link = comment_result.getHeader('Location')
>>> comment = reviewer_webservice.get(comment_link).jsonBody()
>>> pprint_entry(comment)
- as_quoted_email: u'> This is great work'
- author_link: u'http://api.launchpad.test/devel/~...'
- branch_merge_proposal_link: u'http://.../~source/fooix/fix-it/+merge/...'
- date_created: u'...'
+ as_quoted_email: '> This is great work'
+ author_link: 'http://api.launchpad.test/devel/~...'
+ branch_merge_proposal_link: 'http://.../~source/fooix/fix-it/+merge/...'
+ date_created: '...'
id: ...
- message_body: u'This is great work'
- resource_type_link: u'http://.../#code_review_comment'
- self_link: u'http://.../~source/fooix/fix-it/+merge/.../comments/...'
+ message_body: 'This is great work'
+ resource_type_link: 'http://.../#code_review_comment'
+ self_link: 'http://.../~source/fooix/fix-it/+merge/.../comments/...'
title: ...
- vote: u'Approve'
- vote_tag: u'code'
- web_link: u'http://code.../~source/fooix/fix-it/+merge/.../comments/...'
+ vote: 'Approve'
+ vote_tag: 'code'
+ web_link: 'http://code.../~source/fooix/fix-it/+merge/.../comments/...'
In fact, now that the votes indicate approval, we might as well set the merge
proposal status to "Approved" as well.
diff --git a/lib/lp/code/stories/webservice/xx-branchsubscription.txt b/lib/lp/code/stories/webservice/xx-branchsubscription.txt
index 1db3ba0..314a183 100644
--- a/lib/lp/code/stories/webservice/xx-branchsubscription.txt
+++ b/lib/lp/code/stories/webservice/xx-branchsubscription.txt
@@ -31,15 +31,15 @@ A user can subscribe to a branch through the API.
>>> from lazr.restful.testing.webservice import pprint_entry
>>> pprint_entry(subscription.jsonBody())
- branch_link: u'http://.../~farmer-bob/farm/corn'
- max_diff_lines: u"Don't send diffs"
- notification_level: u'Branch attribute notifications only'
- person_link: u'http://.../~farmer-joe'
- resource_type_link: u'http://.../#branch_subscription'
- review_level: u'No email'
- self_link: u'http://.../~farmer-bob/farm/corn/+subscription/farmer-joe'
- subscribed_by_link: u'http://.../~salgado'
- web_link: u'http://code.../~farmer-bob/farm/corn/+subscription/farmer-joe'
+ branch_link: 'http://.../~farmer-bob/farm/corn'
+ max_diff_lines: "Don't send diffs"
+ notification_level: 'Branch attribute notifications only'
+ person_link: 'http://.../~farmer-joe'
+ resource_type_link: 'http://.../#branch_subscription'
+ review_level: 'No email'
+ self_link: 'http://.../~farmer-bob/farm/corn/+subscription/farmer-joe'
+ subscribed_by_link: 'http://.../~salgado'
+ web_link: 'http://code.../~farmer-bob/farm/corn/+subscription/farmer-joe'
>>> def print_subscriber_count(branch):
... subscribers = webservice.get(
@@ -86,15 +86,15 @@ was originally subscribed.
... code_review_level=u'Status changes only')
>>> pprint_entry(subscription.jsonBody())
- branch_link: u'http://.../~farmer-bob/farm/corn'
- max_diff_lines: u'Send entire diff'
- notification_level: u'No email'
- person_link: u'http://.../~farmer-joe'
- resource_type_link: u'http://.../#branch_subscription'
- review_level: u'Status changes only'
- self_link: u'http://.../~farmer-bob/farm/corn/+subscription/farmer-joe'
- subscribed_by_link: u'http://.../~salgado'
- web_link: u'http://code.../~farmer-bob/farm/corn/+subscription/farmer-joe'
+ branch_link: 'http://.../~farmer-bob/farm/corn'
+ max_diff_lines: 'Send entire diff'
+ notification_level: 'No email'
+ person_link: 'http://.../~farmer-joe'
+ resource_type_link: 'http://.../#branch_subscription'
+ review_level: 'Status changes only'
+ self_link: 'http://.../~farmer-bob/farm/corn/+subscription/farmer-joe'
+ subscribed_by_link: 'http://.../~salgado'
+ web_link: 'http://code.../~farmer-bob/farm/corn/+subscription/farmer-joe'
We print the count, and even though subscribe was called again, there's still
diff --git a/lib/lp/registry/stories/webservice/xx-distribution-mirror.txt b/lib/lp/registry/stories/webservice/xx-distribution-mirror.txt
index 3e49ebe..2737490 100644
--- a/lib/lp/registry/stories/webservice/xx-distribution-mirror.txt
+++ b/lib/lp/registry/stories/webservice/xx-distribution-mirror.txt
@@ -12,28 +12,28 @@ mirrors:
... ubuntu['self_link'], 'getMirrorByName',
... name='canonical-archive').jsonBody()
>>> pprint_entry(canonical_archive)
- content: u'Archive'
+ content: 'Archive'
country_dns_mirror: False
- country_link: u'http://.../+countries/GB'
- date_created: u'2006-10-16T18:31:43.434567+00:00'
+ country_link: 'http://.../+countries/GB'
+ date_created: '2006-10-16T18:31:43.434567+00:00'
date_reviewed: None
description: None
displayname: None
- distribution_link: u'http://.../ubuntu'
+ distribution_link: 'http://.../ubuntu'
enabled: True
ftp_base_url: None
- http_base_url: u'http://archive.ubuntu.com/ubuntu/'
+ http_base_url: 'http://archive.ubuntu.com/ubuntu/'
https_base_url: None
- name: u'canonical-archive'
+ name: 'canonical-archive'
official_candidate: True
- owner_link: u'http://.../~mark'
- resource_type_link: u'http://.../#distribution_mirror'
+ owner_link: 'http://.../~mark'
+ resource_type_link: 'http://.../#distribution_mirror'
reviewer_link: None
rsync_base_url: None
- self_link: u'http://.../ubuntu/+mirror/canonical-archive'
- speed: u'100 Mbps'
- status: u'Official'
- web_link: u'http://launchpad.../ubuntu/+mirror/canonical-archive'
+ self_link: 'http://.../ubuntu/+mirror/canonical-archive'
+ speed: '100 Mbps'
+ status: 'Official'
+ web_link: 'http://launchpad.../ubuntu/+mirror/canonical-archive'
whiteboard: None
And CD image mirrors:
@@ -42,28 +42,28 @@ And CD image mirrors:
>>> canonical_releases = ubuntu_cd_mirrors['entries'][0]
>>> canonical_releases_json = webservice.get(canonical_releases['self_link']).jsonBody()
>>> pprint_entry(canonical_releases_json)
- content: u'CD Image'
+ content: 'CD Image'
country_dns_mirror: False
- country_link: u'http://.../+countries/GB'
- date_created: u'2006-10-16T18:31:43.434567+00:00'
+ country_link: 'http://.../+countries/GB'
+ date_created: '2006-10-16T18:31:43.434567+00:00'
date_reviewed: None
description: None
displayname: None
- distribution_link: u'http://.../ubuntu'
+ distribution_link: 'http://.../ubuntu'
enabled: True
ftp_base_url: None
- http_base_url: u'http://releases.ubuntu.com/'
+ http_base_url: 'http://releases.ubuntu.com/'
https_base_url: None
- name: u'canonical-releases'
+ name: 'canonical-releases'
official_candidate: True
- owner_link: u'http://.../~mark'
- resource_type_link: u'http://.../#distribution_mirror'
+ owner_link: 'http://.../~mark'
+ resource_type_link: 'http://.../#distribution_mirror'
reviewer_link: None
rsync_base_url: None
- self_link: u'http://.../ubuntu/+mirror/canonical-releases'
- speed: u'100 Mbps'
- status: u'Official'
- web_link: u'http://launchpad.../ubuntu/+mirror/canonical-releases'
+ self_link: 'http://.../ubuntu/+mirror/canonical-releases'
+ speed: '100 Mbps'
+ status: 'Official'
+ web_link: 'http://launchpad.../ubuntu/+mirror/canonical-releases'
whiteboard: None
= Security checks =
@@ -136,28 +136,28 @@ Mirror listing admins may see all:
>>> response = karl_webservice.get(
... archive_404_mirror['self_link']).jsonBody()
>>> pprint_entry(response)
- content: u'Archive'
+ content: 'Archive'
country_dns_mirror: False
- country_link: u'http://.../+countries/FR'
- date_created: u'2006-10-16T18:31:43.438573+00:00'
+ country_link: 'http://.../+countries/FR'
+ date_created: '2006-10-16T18:31:43.438573+00:00'
date_reviewed: None
description: None
displayname: None
- distribution_link: u'http://.../ubuntu'
+ distribution_link: 'http://.../ubuntu'
enabled: True
ftp_base_url: None
- http_base_url: u'http://localhost:11375/archive-mirror/'
+ http_base_url: 'http://localhost:11375/archive-mirror/'
https_base_url: None
- name: u'archive-404-mirror'
+ name: 'archive-404-mirror'
official_candidate: True
- owner_link: u'http://.../~name12'
- resource_type_link: u'http://.../#distribution_mirror'
+ owner_link: 'http://.../~name12'
+ resource_type_link: 'http://.../#distribution_mirror'
reviewer_link: None
rsync_base_url: None
- self_link: u'http://.../ubuntu/+mirror/archive-404-mirror'
- speed: u'512 Kbps'
- status: u'Official'
- web_link: u'http://launchpad.../ubuntu/+mirror/archive-404-mirror'
+ self_link: 'http://.../ubuntu/+mirror/archive-404-mirror'
+ speed: '512 Kbps'
+ status: 'Official'
+ web_link: 'http://launchpad.../ubuntu/+mirror/archive-404-mirror'
whiteboard: None
Now trying to set the owner using Sample Person's webservice is not authorized.
@@ -219,29 +219,29 @@ While others can be set with the appropriate authorization:
>>> response = karl_webservice.patch(
... canonical_releases['self_link'], 'application/json', dumps(patch)).jsonBody()
>>> pprint_entry(response)
- content: u'CD Image'
+ content: 'CD Image'
country_dns_mirror: False
- country_link: u'http://.../+countries/GL'
- date_created: u'2006-10-16T18:31:43.434567+00:00'
+ country_link: 'http://.../+countries/GL'
+ date_created: '2006-10-16T18:31:43.434567+00:00'
date_reviewed: None
description: None
displayname: None
- distribution_link: u'http://.../ubuntu'
+ distribution_link: 'http://.../ubuntu'
enabled: True
ftp_base_url: None
- http_base_url: u'http://releases.ubuntu.com/'
+ http_base_url: 'http://releases.ubuntu.com/'
https_base_url: None
- name: u'canonical-releases'
+ name: 'canonical-releases'
official_candidate: True
- owner_link: u'http://.../~mark'
- resource_type_link: u'http://.../#distribution_mirror'
+ owner_link: 'http://.../~mark'
+ resource_type_link: 'http://.../#distribution_mirror'
reviewer_link: None
rsync_base_url: None
- self_link: u'http://.../ubuntu/+mirror/canonical-releases'
- speed: u'100 Mbps'
- status: u'Unofficial'
- web_link: u'http://launchpad.../ubuntu/+mirror/canonical-releases'
- whiteboard: u'This mirror is too shiny to be true'
+ self_link: 'http://.../ubuntu/+mirror/canonical-releases'
+ speed: '100 Mbps'
+ status: 'Unofficial'
+ web_link: 'http://launchpad.../ubuntu/+mirror/canonical-releases'
+ whiteboard: 'This mirror is too shiny to be true'
= Distribution Mirror Custom Operations =
diff --git a/lib/lp/registry/stories/webservice/xx-distribution.txt b/lib/lp/registry/stories/webservice/xx-distribution.txt
index f99a1a9..3463c08 100644
--- a/lib/lp/registry/stories/webservice/xx-distribution.txt
+++ b/lib/lp/registry/stories/webservice/xx-distribution.txt
@@ -20,30 +20,30 @@ And for every distribution we publish most of its attributes.
>>> ubuntu = webservice.get(distro['self_link']).jsonBody()
>>> pprint_entry(ubuntu)
active: True
- active_milestones_collection_link: u'http://.../ubuntu/active_milestones'
- all_milestones_collection_link: u'http://.../ubuntu/all_milestones'
- archive_mirrors_collection_link: u'http://.../ubuntu/archive_mirrors'
- archives_collection_link: u'http://.../ubuntu/archives'
+ active_milestones_collection_link: 'http://.../ubuntu/active_milestones'
+ all_milestones_collection_link: 'http://.../ubuntu/all_milestones'
+ archive_mirrors_collection_link: 'http://.../ubuntu/archive_mirrors'
+ archives_collection_link: 'http://.../ubuntu/archives'
bug_reported_acknowledgement: None
bug_reporting_guidelines: None
bug_supervisor_link: None
- cdimage_mirrors_collection_link: u'http://.../ubuntu/cdimage_mirrors'
- current_series_link: u'http://.../ubuntu/hoary'
- date_created: u'2006-10-16T18:31:43.415195+00:00'
- derivatives_collection_link: u'http://.../ubuntu/derivatives'
- description: u'Ubuntu is a new approach...'
+ cdimage_mirrors_collection_link: 'http://.../ubuntu/cdimage_mirrors'
+ current_series_link: 'http://.../ubuntu/hoary'
+ date_created: '2006-10-16T18:31:43.415195+00:00'
+ derivatives_collection_link: 'http://.../ubuntu/derivatives'
+ description: 'Ubuntu is a new approach...'
development_series_alias: None
- display_name: u'Ubuntu'
- domain_name: u'ubuntulinux.org'
+ display_name: 'Ubuntu'
+ domain_name: 'ubuntulinux.org'
driver_link: None
homepage_content: None
- icon_link: u'http://.../ubuntu/icon'
- logo_link: u'http://.../ubuntu/logo'
- main_archive_link: u'http://.../ubuntu/+archive/primary'
- members_link: u'http://.../~ubuntu-team'
- mirror_admin_link: u'http://.../~ubuntu-mirror-admins'
- mugshot_link: u'http://.../ubuntu/mugshot'
- name: u'ubuntu'
+ icon_link: 'http://.../ubuntu/icon'
+ logo_link: 'http://.../ubuntu/logo'
+ main_archive_link: 'http://.../ubuntu/+archive/primary'
+ members_link: 'http://.../~ubuntu-team'
+ mirror_admin_link: 'http://.../~ubuntu-mirror-admins'
+ mugshot_link: 'http://.../ubuntu/mugshot'
+ name: 'ubuntu'
oci_project_admin_link: None
official_answers: True
official_blueprints: True
@@ -51,18 +51,18 @@ And for every distribution we publish most of its attributes.
official_bugs: True
official_codehosting: False
official_packages: True
- owner_link: u'http://.../~ubuntu-team'
+ owner_link: 'http://.../~ubuntu-team'
redirect_release_uploads: False
- registrant_link: u'http://.../~registry'
- resource_type_link: u'http://.../#distribution'
- self_link: u'http://.../ubuntu'
- series_collection_link: u'http://.../ubuntu/series'
- summary: u'Ubuntu is a new approach to Linux Distribution...'
+ registrant_link: 'http://.../~registry'
+ resource_type_link: 'http://.../#distribution'
+ self_link: 'http://.../ubuntu'
+ series_collection_link: 'http://.../ubuntu/series'
+ summary: 'Ubuntu is a new approach to Linux Distribution...'
supports_mirrors: True
supports_ppas: True
- title: u'Ubuntu'
+ title: 'Ubuntu'
vcs: None
- web_link: u'http://launchpad.../ubuntu'
+ web_link: 'http://launchpad.../ubuntu'
Distribution Custom Operations
@@ -149,28 +149,28 @@ packages matching (substring) the given text.
... ubuntu['self_link'], 'getMirrorByName',
... name='canonical-releases').jsonBody()
>>> pprint_entry(canonical_releases)
- content: u'CD Image'
+ content: 'CD Image'
country_dns_mirror: False
- country_link: u'http://.../+countries/GB'
- date_created: u'2006-10-16T18:31:43.434567+00:00'
+ country_link: 'http://.../+countries/GB'
+ date_created: '2006-10-16T18:31:43.434567+00:00'
date_reviewed: None
description: None
displayname: None
- distribution_link: u'http://.../ubuntu'
+ distribution_link: 'http://.../ubuntu'
enabled: True
ftp_base_url: None
- http_base_url: u'http://releases.ubuntu.com/'
+ http_base_url: 'http://releases.ubuntu.com/'
https_base_url: None
- name: u'canonical-releases'
+ name: 'canonical-releases'
official_candidate: True
- owner_link: u'http://.../~mark'
- resource_type_link: u'http://.../#distribution_mirror'
+ owner_link: 'http://.../~mark'
+ resource_type_link: 'http://.../#distribution_mirror'
reviewer_link: None
rsync_base_url: None
- self_link: u'http://.../ubuntu/+mirror/canonical-releases'
- speed: u'100 Mbps'
- status: u'Official'
- web_link: u'http://launchpad.../ubuntu/+mirror/canonical-releases'
+ self_link: 'http://.../ubuntu/+mirror/canonical-releases'
+ speed: '100 Mbps'
+ status: 'Official'
+ web_link: 'http://launchpad.../ubuntu/+mirror/canonical-releases'
whiteboard: None
"getCountryMirror" returns the country DNS mirror for a given country;
@@ -220,9 +220,9 @@ Mark new mirror as official and a country mirror.
... country=antarctica['self_link'],
... mirror_type="Archive").jsonBody()
>>> pprint_entry(antarctica_country_mirror_archive)
- content: u'Archive'
+ content: 'Archive'
country_dns_mirror: True
- country_link: u'http://.../+countries/AQ'
+ country_link: 'http://.../+countries/AQ'
...
>>> uk = webservice.get("/+countries/GB").jsonBody()
diff --git a/lib/lp/registry/stories/webservice/xx-distroseries.txt b/lib/lp/registry/stories/webservice/xx-distroseries.txt
index bc01416..0cff63d 100644
--- a/lib/lp/registry/stories/webservice/xx-distroseries.txt
+++ b/lib/lp/registry/stories/webservice/xx-distroseries.txt
@@ -59,43 +59,43 @@ For distroseries we publish a subset of its attributes.
>>> pprint_entry(current_series)
active: True
active_milestones_collection_link:
- u'http://.../ubuntu/hoary/active_milestones'
+ 'http://.../ubuntu/hoary/active_milestones'
advertise_by_hash: False
- all_milestones_collection_link: u'http://.../ubuntu/hoary/all_milestones'
- architectures_collection_link: u'http://.../ubuntu/hoary/architectures'
+ all_milestones_collection_link: 'http://.../ubuntu/hoary/all_milestones'
+ architectures_collection_link: 'http://.../ubuntu/hoary/architectures'
bug_reported_acknowledgement: None
bug_reporting_guidelines: None
- changeslist: u'hoary-changes@xxxxxxxxxx'
+ changeslist: 'hoary-changes@xxxxxxxxxx'
component_names: [u'main', u'restricted']
- date_created: u'2006-10-16T18:31:43.483559+00:00'
+ date_created: '2006-10-16T18:31:43.483559+00:00'
datereleased: None
- description: u'Hoary is the ...
- displayname: u'Hoary'
- distribution_link: u'http://.../ubuntu'
+ description: 'Hoary is the ...
+ displayname: 'Hoary'
+ distribution_link: 'http://.../ubuntu'
driver_link: None
- drivers_collection_link: u'http://.../ubuntu/hoary/drivers'
- fullseriesname: u'Ubuntu Hoary'
+ drivers_collection_link: 'http://.../ubuntu/hoary/drivers'
+ fullseriesname: 'Ubuntu Hoary'
include_long_descriptions: True
index_compressors: [u'gzip', u'bzip2']
language_pack_full_export_requested: False
- main_archive_link: u'http://.../ubuntu/+archive/primary'
- name: u'hoary'
- nominatedarchindep_link: u'http://.../ubuntu/hoary/i386'
+ main_archive_link: 'http://.../ubuntu/+archive/primary'
+ name: 'hoary'
+ nominatedarchindep_link: 'http://.../ubuntu/hoary/i386'
official_bug_tags: []
- owner_link: u'http://.../~ubuntu-team'
- parent_series_link: u'http://.../ubuntu/warty'
+ owner_link: 'http://.../~ubuntu-team'
+ parent_series_link: 'http://.../ubuntu/warty'
publish_by_hash: False
- registrant_link: u'http://.../~mark'
+ registrant_link: 'http://.../~mark'
resource_type_link: ...
- self_link: u'http://.../ubuntu/hoary'
- status: u'Active Development'
+ self_link: 'http://.../ubuntu/hoary'
+ status: 'Active Development'
suite_names:
[u'Release', u'Security', u'Updates', u'Proposed', u'Backports']
- summary: u'Hoary is the ...
+ summary: 'Hoary is the ...
supported: False
- title: u'The Hoary Hedgehog Release'
- version: u'5.04'
- web_link: u'http://launchpad.../ubuntu/hoary'
+ title: 'The Hoary Hedgehog Release'
+ version: '5.04'
+ web_link: 'http://launchpad.../ubuntu/hoary'
Getting the previous series
diff --git a/lib/lp/registry/stories/webservice/xx-person.txt b/lib/lp/registry/stories/webservice/xx-person.txt
index a70885a..58a700e 100644
--- a/lib/lp/registry/stories/webservice/xx-person.txt
+++ b/lib/lp/registry/stories/webservice/xx-person.txt
@@ -9,121 +9,121 @@ for teams (as they're defined in the ITeam interface).
>>> from lazr.restful.testing.webservice import pprint_entry
>>> salgado = webservice.get("/~salgado").jsonBody()
>>> pprint_entry(salgado)
- admins_collection_link: u'http://.../~salgado/admins'
+ admins_collection_link: 'http://.../~salgado/admins'
archive_link: None
confirmed_email_addresses_collection_link:
- u'http://.../~salgado/confirmed_email_addresses'
- date_created: u'2005-06-06T08:59:51.596025+00:00'
+ 'http://.../~salgado/confirmed_email_addresses'
+ date_created: '2005-06-06T08:59:51.596025+00:00'
deactivated_members_collection_link:
- u'http://.../~salgado/deactivated_members'
+ 'http://.../~salgado/deactivated_members'
description: None
- display_name: u'Guilherme Salgado'
- expired_members_collection_link: u'http://.../~salgado/expired_members'
- gpg_keys_collection_link: u'http://.../~salgado/gpg_keys'
+ display_name: 'Guilherme Salgado'
+ expired_members_collection_link: 'http://.../~salgado/expired_members'
+ gpg_keys_collection_link: 'http://.../~salgado/gpg_keys'
hide_email_addresses: False
homepage_content: None
- invited_members_collection_link: u'http://.../~salgado/invited_members'
- irc_nicknames_collection_link: u'http://.../~salgado/irc_nicknames'
+ invited_members_collection_link: 'http://.../~salgado/invited_members'
+ irc_nicknames_collection_link: 'http://.../~salgado/irc_nicknames'
is_probationary: True
is_team: False
is_ubuntu_coc_signer: False
is_valid: True
- jabber_ids_collection_link: u'http://.../~salgado/jabber_ids'
+ jabber_ids_collection_link: 'http://.../~salgado/jabber_ids'
karma: 0
- languages_collection_link: u'http://.../~salgado/languages'
+ languages_collection_link: 'http://.../~salgado/languages'
latitude: None
- logo_link: u'http://.../~salgado/logo'
+ logo_link: 'http://.../~salgado/logo'
longitude: None
- mailing_list_auto_subscribe_policy: u'Ask me when I join a team'
- members_collection_link: u'http://.../~salgado/members'
- members_details_collection_link: u'http://.../~salgado/members_details'
+ mailing_list_auto_subscribe_policy: 'Ask me when I join a team'
+ members_collection_link: 'http://.../~salgado/members'
+ members_details_collection_link: 'http://.../~salgado/members_details'
memberships_details_collection_link:
- u'http://.../~salgado/memberships_details'
- mugshot_link: u'http://.../~salgado/mugshot'
- name: u'salgado'
+ 'http://.../~salgado/memberships_details'
+ mugshot_link: 'http://.../~salgado/mugshot'
+ name: 'salgado'
open_membership_invitations_collection_link:
- u'http://.../~salgado/open_membership_invitations'
- participants_collection_link: u'http://.../~salgado/participants'
- ppas_collection_link: u'http://.../~salgado/ppas'
+ 'http://.../~salgado/open_membership_invitations'
+ participants_collection_link: 'http://.../~salgado/participants'
+ ppas_collection_link: 'http://.../~salgado/ppas'
preferred_email_address_link:
- u'http://.../~salgado/+email/guilherme.salgado@xxxxxxxxxxxxx'
+ 'http://.../~salgado/+email/guilherme.salgado@xxxxxxxxxxxxx'
private: False
- proposed_members_collection_link: u'http://.../~salgado/proposed_members'
- recipes_collection_link: u'http://.../~salgado/recipes'
- resource_type_link: u'http://.../#person'
- self_link: u'http://.../~salgado'
- sshkeys_collection_link: u'http://.../~salgado/sshkeys'
- sub_teams_collection_link: u'http://.../~salgado/sub_teams'
- super_teams_collection_link: u'http://.../~salgado/super_teams'
+ proposed_members_collection_link: 'http://.../~salgado/proposed_members'
+ recipes_collection_link: 'http://.../~salgado/recipes'
+ resource_type_link: 'http://.../#person'
+ self_link: 'http://.../~salgado'
+ sshkeys_collection_link: 'http://.../~salgado/sshkeys'
+ sub_teams_collection_link: 'http://.../~salgado/sub_teams'
+ super_teams_collection_link: 'http://.../~salgado/super_teams'
team_owner_link: None
- time_zone: u'UTC'
- visibility: u'Public'
- web_link: u'http://launchpad.../~salgado'
- wiki_names_collection_link: u'http://.../~salgado/wiki_names'
+ time_zone: 'UTC'
+ visibility: 'Public'
+ web_link: 'http://launchpad.../~salgado'
+ wiki_names_collection_link: 'http://.../~salgado/wiki_names'
>>> ubuntu_team = webservice.get("/~ubuntu-team").jsonBody()
>>> pprint_entry(ubuntu_team)
- admins_collection_link: u'http://.../~ubuntu-team/admins'
+ admins_collection_link: 'http://.../~ubuntu-team/admins'
archive_link: None
confirmed_email_addresses_collection_link:
- u'http://.../~ubuntu-team/confirmed_email_addresses'
- date_created: u'2005-06-06T08:59:51.605760+00:00'
+ 'http://.../~ubuntu-team/confirmed_email_addresses'
+ date_created: '2005-06-06T08:59:51.605760+00:00'
deactivated_members_collection_link:
- u'http://.../~ubuntu-team/deactivated_members'
+ 'http://.../~ubuntu-team/deactivated_members'
default_membership_period: None
default_renewal_period: None
- description: u'This Team is responsible for the Ubuntu Distribution'
- display_name: u'Ubuntu Team'
+ description: 'This Team is responsible for the Ubuntu Distribution'
+ display_name: 'Ubuntu Team'
expired_members_collection_link:
- u'http://.../~ubuntu-team/expired_members'
- gpg_keys_collection_link: u'http://.../~ubuntu-team/gpg_keys'
+ 'http://.../~ubuntu-team/expired_members'
+ gpg_keys_collection_link: 'http://.../~ubuntu-team/gpg_keys'
hide_email_addresses: False
homepage_content: None
invited_members_collection_link:
- u'http://.../~ubuntu-team/invited_members'
- irc_nicknames_collection_link: u'http://.../~ubuntu-team/irc_nicknames'
+ 'http://.../~ubuntu-team/invited_members'
+ irc_nicknames_collection_link: 'http://.../~ubuntu-team/irc_nicknames'
is_probationary: False
is_team: True
is_ubuntu_coc_signer: False
is_valid: True
- jabber_ids_collection_link: u'http://.../~ubuntu-team/jabber_ids'
+ jabber_ids_collection_link: 'http://.../~ubuntu-team/jabber_ids'
karma: 0
- languages_collection_link: u'http://.../~ubuntu-team/languages'
+ languages_collection_link: 'http://.../~ubuntu-team/languages'
latitude: None
- logo_link: u'http://.../~ubuntu-team/logo'
+ logo_link: 'http://.../~ubuntu-team/logo'
longitude: None
- mailing_list_auto_subscribe_policy: u'Ask me when I join a team'
- members_collection_link: u'http://.../~ubuntu-team/members'
+ mailing_list_auto_subscribe_policy: 'Ask me when I join a team'
+ members_collection_link: 'http://.../~ubuntu-team/members'
members_details_collection_link:
- u'http://.../~ubuntu-team/members_details'
- membership_policy: u'Moderated Team'
+ 'http://.../~ubuntu-team/members_details'
+ membership_policy: 'Moderated Team'
memberships_details_collection_link:
- u'http://.../~ubuntu-team/memberships_details'
- mugshot_link: u'http://.../~ubuntu-team/mugshot'
- name: u'ubuntu-team'
+ 'http://.../~ubuntu-team/memberships_details'
+ mugshot_link: 'http://.../~ubuntu-team/mugshot'
+ name: 'ubuntu-team'
open_membership_invitations_collection_link:
- u'http://.../~ubuntu-team/open_membership_invitations'
- participants_collection_link: u'http://.../~ubuntu-team/participants'
- ppas_collection_link: u'http://.../~ubuntu-team/ppas'
+ 'http://.../~ubuntu-team/open_membership_invitations'
+ participants_collection_link: 'http://.../~ubuntu-team/participants'
+ ppas_collection_link: 'http://.../~ubuntu-team/ppas'
preferred_email_address_link:
- u'http://.../~ubuntu-team/+email/support@xxxxxxxxxx'
+ 'http://.../~ubuntu-team/+email/support@xxxxxxxxxx'
private: False
proposed_members_collection_link:
- u'http://.../~ubuntu-team/proposed_members'
- recipes_collection_link: u'http://.../~ubuntu-team/recipes'
- renewal_policy: u'invite them to apply for renewal'
- resource_type_link: u'http://.../#team'
- self_link: u'http://.../~ubuntu-team'
- sshkeys_collection_link: u'http://.../~ubuntu-team/sshkeys'
- sub_teams_collection_link: u'http://.../~ubuntu-team/sub_teams'
- subscription_policy: u'Moderated Team'
- super_teams_collection_link: u'http://.../~ubuntu-team/super_teams'
- team_description: u'This Team is responsible for the Ubuntu Distribution'
- team_owner_link: u'http://.../~mark'
- time_zone: u'UTC'
- visibility: u'Public'
- web_link: u'http://launchpad.../~ubuntu-team'
- wiki_names_collection_link: u'http://.../~ubuntu-team/wiki_names'
+ 'http://.../~ubuntu-team/proposed_members'
+ recipes_collection_link: 'http://.../~ubuntu-team/recipes'
+ renewal_policy: 'invite them to apply for renewal'
+ resource_type_link: 'http://.../#team'
+ self_link: 'http://.../~ubuntu-team'
+ sshkeys_collection_link: 'http://.../~ubuntu-team/sshkeys'
+ sub_teams_collection_link: 'http://.../~ubuntu-team/sub_teams'
+ subscription_policy: 'Moderated Team'
+ super_teams_collection_link: 'http://.../~ubuntu-team/super_teams'
+ team_description: 'This Team is responsible for the Ubuntu Distribution'
+ team_owner_link: 'http://.../~mark'
+ time_zone: 'UTC'
+ visibility: 'Public'
+ web_link: 'http://launchpad.../~ubuntu-team'
+ wiki_names_collection_link: 'http://.../~ubuntu-team/wiki_names'
>>> sorted(set(ubuntu_team.keys()).difference(salgado.keys()))
[u'default_membership_period', u'default_renewal_period',
@@ -162,10 +162,10 @@ representations too.
>>> email = webservice.get(
... sample_person['preferred_email_address_link']).jsonBody()
>>> pprint_entry(email)
- email: u'test@xxxxxxxxxxxxx'
- person_link: u'http://.../~name12'
- resource_type_link: u'http://.../#email_address'
- self_link: u'http://.../~name12/+email/test@xxxxxxxxxxxxx'
+ email: 'test@xxxxxxxxxxxxx'
+ person_link: 'http://.../~name12'
+ resource_type_link: 'http://.../#email_address'
+ self_link: 'http://.../~name12/+email/test@xxxxxxxxxxxxx'
One can only traverse to the email addresses of the person already
traversed to, obviously.
@@ -219,11 +219,11 @@ show up:
And then we can actually retrieve the key:
>>> pprint_entry(keys['entries'][0])
- comment: u'unique-...'
- keytext: u'...'
- keytype: u'RSA'
- resource_type_link: u'http://.../#ssh_key'
- self_link: u'http://.../~ssh-user/+ssh-keys/...'
+ comment: 'unique-...'
+ keytext: '...'
+ keytype: 'RSA'
+ resource_type_link: 'http://.../#ssh_key'
+ self_link: 'http://.../~ssh-user/+ssh-keys/...'
GPG keys
........
@@ -257,10 +257,10 @@ up:
And then we can actually retrieve the key:
>>> pprint_entry(keys['entries'][0])
- fingerprint: u'...'
- keyid: u'...'
- resource_type_link: u'http://.../#gpg_key'
- self_link: u'http://.../~name12/+gpg-keys/...'
+ fingerprint: '...'
+ keyid: '...'
+ resource_type_link: 'http://.../#gpg_key'
+ self_link: 'http://.../~name12/+gpg-keys/...'
Team memberships
@@ -480,12 +480,12 @@ representations too.
>>> wiki_name = sorted(
... webservice.get(wikis_link).jsonBody()['entries'])[0]
>>> pprint_entry(wiki_name)
- person_link: u'http://.../~salgado'
- resource_type_link: u'http://.../#wiki_name'
- self_link: u'http://.../~salgado/+wikiname/2'
- url: u'https://wiki.ubuntu.com/GuilhermeSalgado'
- wiki: u'https://wiki.ubuntu.com/'
- wikiname: u'GuilhermeSalgado'
+ person_link: 'http://.../~salgado'
+ resource_type_link: 'http://.../#wiki_name'
+ self_link: 'http://.../~salgado/+wikiname/2'
+ url: 'https://wiki.ubuntu.com/GuilhermeSalgado'
+ wiki: 'https://wiki.ubuntu.com/'
+ wikiname: 'GuilhermeSalgado'
One can only traverse to the WikiNames of the person already traversed
to, obviously.
@@ -540,10 +540,10 @@ representations too.
>>> jabber_id = sorted(
... webservice.get(jabber_ids_link).jsonBody()['entries'])[0]
>>> pprint_entry(jabber_id)
- jabberid: u'markshuttleworth@xxxxxxxxxx'
- person_link: u'http://.../~mark'
- resource_type_link: u'http://.../#jabber_id'
- self_link: u'http://.../~mark/+jabberid/markshuttleworth@xxxxxxxxxx'
+ jabberid: 'markshuttleworth@xxxxxxxxxx'
+ person_link: 'http://.../~mark'
+ resource_type_link: 'http://.../#jabber_id'
+ self_link: 'http://.../~mark/+jabberid/markshuttleworth@xxxxxxxxxx'
One can only traverse to the Jabber IDs of the person already traversed
to, obviously.
@@ -576,11 +576,11 @@ too.
>>> irc_id = sorted(webservice.get(irc_ids_link).jsonBody()['entries'])[0]
>>> pprint_entry(irc_id)
- network: u'chat.freenode.net'
- nickname: u'mark'
- person_link: u'http://.../~mark'
- resource_type_link: u'http://.../#irc_id'
- self_link: u'http://.../~mark/+ircnick/1'
+ network: 'chat.freenode.net'
+ nickname: 'mark'
+ person_link: 'http://.../~mark'
+ resource_type_link: 'http://.../#irc_id'
+ self_link: 'http://.../~mark/+ircnick/1'
One can only traverse to the IRC IDs of the person already traversed
to, obviously.
@@ -691,15 +691,15 @@ Subscribed packages can be listed with getBugSubscriberPackages:
---
bug_reported_acknowledgement: None
bug_reporting_guidelines: None
- display_name: u'...'
- distribution_link: u'...'
- name: u'fooix'
+ display_name: '...'
+ distribution_link: '...'
+ name: 'fooix'
official_bug_tags: []
- resource_type_link: u'...'
- self_link: u'...'
- title: u'...'
+ resource_type_link: '...'
+ self_link: '...'
+ title: '...'
upstream_product_link: None
- web_link: u'...'
+ web_link: '...'
---
diff --git a/lib/lp/registry/stories/webservice/xx-project-registry.txt b/lib/lp/registry/stories/webservice/xx-project-registry.txt
index 3694df6..cd6f1f5 100644
--- a/lib/lp/registry/stories/webservice/xx-project-registry.txt
+++ b/lib/lp/registry/stories/webservice/xx-project-registry.txt
@@ -64,33 +64,33 @@ host.
>>> mozilla = webservice.get('/mozilla').jsonBody()
>>> pprint_entry(mozilla)
active: True
- active_milestones_collection_link: u'http://.../mozilla/active_milestones'
- all_milestones_collection_link: u'http://.../mozilla/all_milestones'
+ active_milestones_collection_link: 'http://.../mozilla/active_milestones'
+ all_milestones_collection_link: 'http://.../mozilla/all_milestones'
bug_reported_acknowledgement: None
bug_reporting_guidelines: None
bug_tracker_link: None
- date_created: u'...'
- description: u'The Mozilla Project...'
- display_name: u'The Mozilla Project'
+ date_created: '...'
+ description: 'The Mozilla Project...'
+ display_name: 'The Mozilla Project'
driver_link: None
freshmeat_project: None
homepage_content: None
- homepage_url: u'http://www.mozilla.org/'
- icon_link: u'http://.../mozilla/icon'
- logo_link: u'http://.../mozilla/logo'
- mugshot_link: u'http://.../mozilla/mugshot'
- name: u'mozilla'
+ homepage_url: 'http://www.mozilla.org/'
+ icon_link: 'http://.../mozilla/icon'
+ logo_link: 'http://.../mozilla/logo'
+ mugshot_link: 'http://.../mozilla/mugshot'
+ name: 'mozilla'
official_bug_tags: []
- owner_link: u'http://.../~name12'
- projects_collection_link: u'http://.../mozilla/projects'
- registrant_link: u'http://.../~name12'
- resource_type_link: u'...'
+ owner_link: 'http://.../~name12'
+ projects_collection_link: 'http://.../mozilla/projects'
+ registrant_link: 'http://.../~name12'
+ resource_type_link: '...'
reviewed: False
- self_link: u'http://.../mozilla'
+ self_link: 'http://.../mozilla'
sourceforge_project: None
- summary: u'The Mozilla Project...'
- title: u'The Mozilla Project'
- web_link: u'http://launchpad.../mozilla'
+ summary: 'The Mozilla Project...'
+ title: 'The Mozilla Project'
+ web_link: 'http://launchpad.../mozilla'
wiki_url: None
The milestones can be accessed through the
@@ -151,59 +151,59 @@ Projects are available at their canonical URL on the API virtual host.
>>> firefox = webservice.get('/firefox').jsonBody()
>>> pprint_entry(firefox)
active: True
- active_milestones_collection_link: u'http://.../firefox/active_milestones'
- all_milestones_collection_link: u'http://.../firefox/all_milestones'
- brand_link: u'http://.../firefox/brand'
+ active_milestones_collection_link: 'http://.../firefox/active_milestones'
+ all_milestones_collection_link: 'http://.../firefox/all_milestones'
+ brand_link: 'http://.../firefox/brand'
bug_reported_acknowledgement: None
bug_reporting_guidelines: None
bug_supervisor_link: None
bug_tracker_link: None
commercial_subscription_is_due: False
commercial_subscription_link: None
- date_created: u'2004-09-24T20:58:02.185708+00:00'
+ date_created: '2004-09-24T20:58:02.185708+00:00'
date_next_suggest_packaging: None
- description: u'The Mozilla Firefox web browser'
- development_focus_link: u'http://.../firefox/trunk'
- display_name: u'Mozilla Firefox'
+ description: 'The Mozilla Firefox web browser'
+ development_focus_link: 'http://.../firefox/trunk'
+ display_name: 'Mozilla Firefox'
download_url: None
driver_link: None
freshmeat_project: None
homepage_url: None
- icon_link: u'http://.../firefox/icon'
- information_type: u'Public'
+ icon_link: 'http://.../firefox/icon'
+ information_type: 'Public'
is_permitted: True
license_approved: False
license_info: None
licenses: [u'MIT / X / Expat Licence']
- logo_link: u'http://.../firefox/logo'
- name: u'firefox'
+ logo_link: 'http://.../firefox/logo'
+ name: 'firefox'
official_answers: True
official_blueprints: False
official_bug_tags: []
official_bugs: True
official_codehosting: False
- owner_link: u'http://.../~name12'
+ owner_link: 'http://.../~name12'
private: False
private_bugs: False
programming_language: None
- project_group_link: u'http://.../mozilla'
+ project_group_link: 'http://.../mozilla'
project_reviewed: False
qualifies_for_free_hosting: True
- recipes_collection_link: u'http://.../firefox/recipes'
- registrant_link: u'http://.../~name12'
- releases_collection_link: u'http://.../firefox/releases'
+ recipes_collection_link: 'http://.../firefox/recipes'
+ registrant_link: 'http://.../~name12'
+ releases_collection_link: 'http://.../firefox/releases'
remote_product: None
- resource_type_link: u'http://.../#project'
+ resource_type_link: 'http://.../#project'
reviewer_whiteboard: None
screenshots_url: None
- self_link: u'http://.../firefox'
- series_collection_link: u'http://.../firefox/series'
+ self_link: 'http://.../firefox'
+ series_collection_link: 'http://.../firefox/series'
sourceforge_project: None
- summary: u'The Mozilla Firefox web browser'
- title: u'Mozilla Firefox'
+ summary: 'The Mozilla Firefox web browser'
+ title: 'Mozilla Firefox'
translation_focus_link: None
vcs: None
- web_link: u'http://launchpad.../firefox'
+ web_link: 'http://launchpad.../firefox'
wiki_url: None
In Launchpad project names may not have uppercase letters in their
@@ -665,9 +665,9 @@ functionality at an object called the pillar set.
>>> pillar_set = webservice.get("/pillars").jsonBody()
>>> pprint_entry(pillar_set)
- featured_pillars_collection_link: u'http://.../pillars/featured_pillars'
- resource_type_link: u'...'
- self_link: u'...'
+ featured_pillars_collection_link: 'http://.../pillars/featured_pillars'
+ resource_type_link: '...'
+ self_link: '...'
The featured pillars are available as a separate collection. Because
they're of different resource types, the best way to compare them is by
@@ -727,28 +727,28 @@ virtual host.
>>> pprint_entry(babadoo_foobadoo)
active: True
active_milestones_collection_link:
- u'http://.../babadoo/foobadoo/active_milestones'
+ 'http://.../babadoo/foobadoo/active_milestones'
all_milestones_collection_link:
- u'http://.../babadoo/foobadoo/all_milestones'
- branch_link: u'http://.../~babadoo-owner/babadoo/fooey'
+ 'http://.../babadoo/foobadoo/all_milestones'
+ branch_link: 'http://.../~babadoo-owner/babadoo/fooey'
bug_reported_acknowledgement: None
bug_reporting_guidelines: None
- date_created: u'...'
- display_name: u'foobadoo'
+ date_created: '...'
+ display_name: 'foobadoo'
driver_link: None
- drivers_collection_link: u'http://.../babadoo/foobadoo/drivers'
- name: u'foobadoo'
+ drivers_collection_link: 'http://.../babadoo/foobadoo/drivers'
+ name: 'foobadoo'
official_bug_tags: []
- owner_link: u'http://.../~babadoo-owner'
- project_link: u'http://.../babadoo'
+ owner_link: 'http://.../~babadoo-owner'
+ project_link: 'http://.../babadoo'
release_finder_url_pattern: None
- releases_collection_link: u'http://.../babadoo/foobadoo/releases'
- resource_type_link: u'...'
- self_link: u'http://.../babadoo/foobadoo'
- status: u'Active Development'
- summary: u'Foobadoo support for Babadoo'
- title: u'Babadoo foobadoo series'
- web_link: u'http://launchpad.../babadoo/foobadoo'
+ releases_collection_link: 'http://.../babadoo/foobadoo/releases'
+ resource_type_link: '...'
+ self_link: 'http://.../babadoo/foobadoo'
+ status: 'Active Development'
+ summary: 'Foobadoo support for Babadoo'
+ title: 'Babadoo foobadoo series'
+ web_link: 'http://launchpad.../babadoo/foobadoo'
"get_timeline" returns a lightweight representation of the series'
milestones and releases.
@@ -840,20 +840,20 @@ host.
>>> firefox_1_0_0 = webservice.get('/firefox/1.0/1.0.0').jsonBody()
>>> pprint_entry(firefox_1_0_0)
- changelog: u''
- date_created: u'2005-06-06T08:59:51.930201+00:00'
- date_released: u'2004-06-28T00:00:00+00:00'
- display_name: u'Mozilla Firefox 1.0.0'
- files_collection_link: u'http://.../firefox/1.0/1.0.0/files'
- milestone_link: u'http://.../firefox/+milestone/1.0.0'
- owner_link: u'http://.../~name12'
- project_link: u'http://.../firefox'
- release_notes: u'...'
- resource_type_link: u'...'
- self_link: u'http://.../firefox/1.0/1.0.0'
- title: u'Mozilla Firefox 1.0.0 "First Stable Release"'
- version: u'1.0.0'
- web_link: u'http://launchpad.../firefox/1.0/1.0.0'
+ changelog: ''
+ date_created: '2005-06-06T08:59:51.930201+00:00'
+ date_released: '2004-06-28T00:00:00+00:00'
+ display_name: 'Mozilla Firefox 1.0.0'
+ files_collection_link: 'http://.../firefox/1.0/1.0.0/files'
+ milestone_link: 'http://.../firefox/+milestone/1.0.0'
+ owner_link: 'http://.../~name12'
+ project_link: 'http://.../firefox'
+ release_notes: '...'
+ resource_type_link: '...'
+ self_link: 'http://.../firefox/1.0/1.0.0'
+ title: 'Mozilla Firefox 1.0.0 "First Stable Release"'
+ version: '1.0.0'
+ web_link: 'http://launchpad.../firefox/1.0/1.0.0'
The createProductRelease method is called by sending
"ws.op=createProductRelease" as a request variable along with the
@@ -920,18 +920,18 @@ virtual host.
... '/firefox/+milestone/1.0').jsonBody()
>>> pprint_entry(firefox_milestone_1_0)
code_name: None
- date_targeted: u'2056-10-16'
+ date_targeted: '2056-10-16'
is_active: True
- name: u'1.0'
+ name: '1.0'
official_bug_tags: []
release_link: None
- resource_type_link: u'...'
- self_link: u'http://.../firefox/+milestone/1.0'
- series_target_link: u'http://.../firefox/trunk'
+ resource_type_link: '...'
+ self_link: 'http://.../firefox/+milestone/1.0'
+ series_target_link: 'http://.../firefox/trunk'
summary: None
- target_link: u'http://.../firefox'
- title: u'Mozilla Firefox 1.0'
- web_link: u'http://launchpad.../firefox/+milestone/1.0'
+ target_link: 'http://.../firefox'
+ title: 'Mozilla Firefox 1.0'
+ web_link: 'http://launchpad.../firefox/+milestone/1.0'
The milestone entry has a link to its release if it has one.
@@ -966,17 +966,17 @@ virtual host.
>>> url = '/firefox/trunk/0.9.2/+file/firefox_0.9.2.orig.tar.gz'
>>> result = webservice.get(url).jsonBody()
>>> pprint_entry(result)
- date_uploaded: u'2005-06-06T08:59:51.926792+00:00'
+ date_uploaded: '2005-06-06T08:59:51.926792+00:00'
description: None
file_link:
- u'http://.../firefox/trunk/0.9.2/+file/firefox_0.9.2.orig.tar.gz/file'
- file_type: u'Code Release Tarball'
- project_release_link: u'http://.../firefox/trunk/0.9.2'
- resource_type_link: u'http://.../#project_release_file'
+ 'http://.../firefox/trunk/0.9.2/+file/firefox_0.9.2.orig.tar.gz/file'
+ file_type: 'Code Release Tarball'
+ project_release_link: 'http://.../firefox/trunk/0.9.2'
+ resource_type_link: 'http://.../#project_release_file'
self_link:
- u'http://.../firefox/trunk/0.9.2/+file/firefox_0.9.2.orig.tar.gz'
+ 'http://.../firefox/trunk/0.9.2/+file/firefox_0.9.2.orig.tar.gz'
signature_link:
- u'http://.../trunk/0.9.2/+file/firefox_0.9.2.orig.tar.gz/signature'
+ 'http://.../trunk/0.9.2/+file/firefox_0.9.2.orig.tar.gz/signature'
The actual file redirects to the librarian when accessed.
diff --git a/lib/lp/registry/stories/webservice/xx-source-package.txt b/lib/lp/registry/stories/webservice/xx-source-package.txt
index b994be1..eb577dc 100644
--- a/lib/lp/registry/stories/webservice/xx-source-package.txt
+++ b/lib/lp/registry/stories/webservice/xx-source-package.txt
@@ -29,16 +29,16 @@ distribution series.
>>> pprint_entry(evolution)
bug_reported_acknowledgement: None
bug_reporting_guidelines: None
- displayname: u'evolution in My-distro My-series'
- distribution_link: u'http://.../my-distro'
- distroseries_link: u'http://.../my-distro/my-series'
+ displayname: 'evolution in My-distro My-series'
+ distribution_link: 'http://.../my-distro'
+ distroseries_link: 'http://.../my-distro/my-series'
latest_published_component_name: None
- name: u'evolution'
+ name: 'evolution'
official_bug_tags: []
productseries_link: None
resource_type_link: ...
- self_link: u'http://api.../my-distro/my-series/+source/evolution'
- web_link: u'http://.../+source/evolution'
+ self_link: 'http://api.../my-distro/my-series/+source/evolution'
+ web_link: 'http://.../+source/evolution'
Getting official branches
diff --git a/lib/lp/registry/stories/webservice/xx-structuralsubscription.txt b/lib/lp/registry/stories/webservice/xx-structuralsubscription.txt
index d740115..c072745 100644
--- a/lib/lp/registry/stories/webservice/xx-structuralsubscription.txt
+++ b/lib/lp/registry/stories/webservice/xx-structuralsubscription.txt
@@ -46,14 +46,14 @@ Now Eric subscribes to Fooix's bug notifications.
start: 0
total_size: 1
---
- bug_filters_collection_link: u'.../fooix/+subscription/eric/bug_filters'
- date_created: u'...'
- date_last_updated: u'...'
- resource_type_link: u'http://.../#structural_subscription'
- self_link: u'http://.../fooix/+subscription/eric'
- subscribed_by_link: u'http://.../~eric'
- subscriber_link: u'http://.../~eric'
- target_link: u'http://.../fooix'
+ bug_filters_collection_link: '.../fooix/+subscription/eric/bug_filters'
+ date_created: '...'
+ date_last_updated: '...'
+ resource_type_link: 'http://.../#structural_subscription'
+ self_link: 'http://.../fooix/+subscription/eric'
+ subscribed_by_link: 'http://.../~eric'
+ subscriber_link: 'http://.../~eric'
+ target_link: 'http://.../fooix'
---
He can examine his subscription directly.
@@ -61,14 +61,14 @@ He can examine his subscription directly.
>>> pprint_entry(eric_webservice.named_get(
... '/fooix', 'getSubscription',
... person=webservice.getAbsoluteUrl('/~eric')).jsonBody())
- bug_filters_collection_link: u'.../fooix/+subscription/eric/bug_filters'
- date_created: u'...'
- date_last_updated: u'...'
- resource_type_link: u'http://.../#structural_subscription'
- self_link: u'http://.../fooix/+subscription/eric'
- subscribed_by_link: u'http://.../~eric'
- subscriber_link: u'http://.../~eric'
- target_link: u'http://.../fooix'
+ bug_filters_collection_link: '.../fooix/+subscription/eric/bug_filters'
+ date_created: '...'
+ date_last_updated: '...'
+ resource_type_link: 'http://.../#structural_subscription'
+ self_link: 'http://.../fooix/+subscription/eric'
+ subscribed_by_link: 'http://.../~eric'
+ subscriber_link: 'http://.../~eric'
+ target_link: 'http://.../fooix'
If the subscription doesn't exist, None will be returned.
@@ -118,14 +118,14 @@ admin by virtue of his ownership.
start: 0
total_size: 1
---
- bug_filters_collection_link: u'.../fooix/+subscription/pythons/bug_filters'
- date_created: u'...'
- date_last_updated: u'...'
- resource_type_link: u'http://.../#structural_subscription'
- self_link: u'http://.../fooix/+subscription/pythons'
- subscribed_by_link: u'http://.../~michael'
- subscriber_link: u'http://.../~pythons'
- target_link: u'http://.../fooix'
+ bug_filters_collection_link: '.../fooix/+subscription/pythons/bug_filters'
+ date_created: '...'
+ date_last_updated: '...'
+ resource_type_link: 'http://.../#structural_subscription'
+ self_link: 'http://.../fooix/+subscription/pythons'
+ subscribed_by_link: 'http://.../~michael'
+ subscriber_link: 'http://.../~pythons'
+ target_link: 'http://.../fooix'
---
Eric can't unsubscribe the team either.
diff --git a/lib/lp/services/worlddata/stories/webservice/xx-country.txt b/lib/lp/services/worlddata/stories/webservice/xx-country.txt
index d2aba2d..30aeaa7 100644
--- a/lib/lp/services/worlddata/stories/webservice/xx-country.txt
+++ b/lib/lp/services/worlddata/stories/webservice/xx-country.txt
@@ -18,12 +18,12 @@ And for every country we publish most of its attributes.
>>> andorra = webservice.get(country['self_link']).jsonBody()
>>> pprint_entry(andorra)
description: None
- iso3166code2: u'AD'
- iso3166code3: u'AND'
- name: u'Andorra'
- resource_type_link: u'http://.../#country'
- self_link: u'http://.../+countries/AD'
- title: u'Principality of Andorra'
+ iso3166code2: 'AD'
+ iso3166code3: 'AND'
+ name: 'Andorra'
+ resource_type_link: 'http://.../#country'
+ self_link: 'http://.../+countries/AD'
+ title: 'Principality of Andorra'
Make sure that invalid countries return 404s and not OOPSes.
diff --git a/lib/lp/soyuz/stories/webservice/xx-archive-commercial.txt b/lib/lp/soyuz/stories/webservice/xx-archive-commercial.txt
index 005f8d6..f90ee45 100644
--- a/lib/lp/soyuz/stories/webservice/xx-archive-commercial.txt
+++ b/lib/lp/soyuz/stories/webservice/xx-archive-commercial.txt
@@ -136,16 +136,16 @@ It returns a collection of `ArchiveSubscriber` objects:
start: 0
total_size: 1
---
- archive_link: u'http://.../+archive/ubuntu/commercial'
+ archive_link: 'http://.../+archive/ubuntu/commercial'
date_created: ...
date_expires: None
description: None
- registrant_link: u'http://.../~software-center-agent'
- resource_type_link: u'http://.../#archive_subscriber'
- self_link: u'http://.../+archive/ubuntu/commercial/+subscriptions/joe'
- status: u'Active'
- subscriber_link: u'http://.../~joe'
- web_link: u'http://.../+archive/ubuntu/commercial/+subscriptions/joe'
+ registrant_link: 'http://.../~software-center-agent'
+ resource_type_link: 'http://.../#archive_subscriber'
+ self_link: 'http://.../+archive/ubuntu/commercial/+subscriptions/joe'
+ status: 'Active'
+ subscriber_link: 'http://.../~joe'
+ web_link: 'http://.../+archive/ubuntu/commercial/+subscriptions/joe'
---
Additionally to the person itself, the subscriptions can be inspected
@@ -168,16 +168,16 @@ and it includes 'commercial-admins' users:
start: 0
total_size: 1
---
- archive_link: u'http://.../+archive/ubuntu/commercial'
+ archive_link: 'http://.../+archive/ubuntu/commercial'
date_created: ...
date_expires: None
description: None
- registrant_link: u'http://.../~software-center-agent'
- resource_type_link: u'http://.../#archive_subscriber'
- self_link: u'http://.../+archive/ubuntu/commercial/+subscriptions/joe'
- status: u'Active'
- subscriber_link: u'http://.../~joe'
- web_link: u'http://.../+archive/ubuntu/commercial/+subscriptions/joe'
+ registrant_link: 'http://.../~software-center-agent'
+ resource_type_link: 'http://.../#archive_subscriber'
+ self_link: 'http://.../+archive/ubuntu/commercial/+subscriptions/joe'
+ status: 'Active'
+ subscriber_link: 'http://.../~joe'
+ web_link: 'http://.../+archive/ubuntu/commercial/+subscriptions/joe'
---
Subscription cancellation can be performed by invoking 'cancel' operation
diff --git a/lib/lp/soyuz/stories/webservice/xx-archive.txt b/lib/lp/soyuz/stories/webservice/xx-archive.txt
index 7acd47c..0b07995 100644
--- a/lib/lp/soyuz/stories/webservice/xx-archive.txt
+++ b/lib/lp/soyuz/stories/webservice/xx-archive.txt
@@ -18,22 +18,22 @@ We publish a subset of their attributes.
>>> pprint_entry(cprov_archive)
authorized_size: 1024
dependencies_collection_link:
- u'http://.../~cprov/+archive/ubuntu/ppa/dependencies'
- description: u'packages to help my friends.'
- displayname: u'PPA for Celso Providelo'
- distribution_link: u'http://.../ubuntu'
+ 'http://.../~cprov/+archive/ubuntu/ppa/dependencies'
+ description: 'packages to help my friends.'
+ displayname: 'PPA for Celso Providelo'
+ distribution_link: 'http://.../ubuntu'
external_dependencies: None
- name: u'ppa'
- owner_link: u'http://.../~cprov'
+ name: 'ppa'
+ owner_link: 'http://.../~cprov'
private: False
- reference: u'~cprov/ubuntu/ppa'
+ reference: '~cprov/ubuntu/ppa'
relative_build_score: 0
require_virtualized: True
- resource_type_link: u'http://.../#archive'
- self_link: u'http://.../~cprov/+archive/ubuntu/ppa'
+ resource_type_link: 'http://.../#archive'
+ self_link: 'http://.../~cprov/+archive/ubuntu/ppa'
signing_key_fingerprint: None
suppress_subscription_notifications: False
- web_link: u'http://launchpad.../~cprov/+archive/ubuntu/ppa'
+ web_link: 'http://launchpad.../~cprov/+archive/ubuntu/ppa'
For "devel" additional attributes are available.
@@ -42,27 +42,27 @@ For "devel" additional attributes are available.
>>> pprint_entry(cprov_archive_devel)
authorized_size: 1024
build_debug_symbols: False
- dependencies_collection_link: u'http://.../~cprov/+archive/ubuntu/ppa/dependencies'
- description: u'packages to help my friends.'
- displayname: u'PPA for Celso Providelo'
- distribution_link: u'http://.../ubuntu'
- enabled_restricted_processors_collection_link: u'http://.../~cprov/+archive/ubuntu/ppa/enabled_restricted_processors'
+ dependencies_collection_link: 'http://.../~cprov/+archive/ubuntu/ppa/dependencies'
+ description: 'packages to help my friends.'
+ displayname: 'PPA for Celso Providelo'
+ distribution_link: 'http://.../ubuntu'
+ enabled_restricted_processors_collection_link: 'http://.../~cprov/+archive/ubuntu/ppa/enabled_restricted_processors'
external_dependencies: None
- name: u'ppa'
- owner_link: u'http://.../~cprov'
+ name: 'ppa'
+ owner_link: 'http://.../~cprov'
permit_obsolete_series_uploads: False
private: False
- processors_collection_link: u'http://.../~cprov/+archive/ubuntu/ppa/processors'
+ processors_collection_link: 'http://.../~cprov/+archive/ubuntu/ppa/processors'
publish_debug_symbols: False
- reference: u'~cprov/ubuntu/ppa'
+ reference: '~cprov/ubuntu/ppa'
relative_build_score: 0
require_virtualized: True
- resource_type_link: u'http://.../#archive'
- self_link: u'http://.../~cprov/+archive/ubuntu/ppa'
+ resource_type_link: 'http://.../#archive'
+ self_link: 'http://.../~cprov/+archive/ubuntu/ppa'
signing_key_fingerprint: None
- status: u'Active'
+ status: 'Active'
suppress_subscription_notifications: False
- web_link: u'http://launchpad.../~cprov/+archive/ubuntu/ppa'
+ web_link: 'http://launchpad.../~cprov/+archive/ubuntu/ppa'
While the Archive signing key is being generated its
'signing_key_fingerprint' attribute is None.
@@ -122,22 +122,22 @@ The archive has the following attributes:
>>> pprint_entry(ubuntu_main_archive)
authorized_size: None
dependencies_collection_link:
- u'http://.../ubuntutest/+archive/primary/dependencies'
+ 'http://.../ubuntutest/+archive/primary/dependencies'
description: None
- displayname: u'Primary Archive for Ubuntu Test'
- distribution_link: u'http://.../ubuntutest'
+ displayname: 'Primary Archive for Ubuntu Test'
+ distribution_link: 'http://.../ubuntutest'
external_dependencies: None
- name: u'primary'
- owner_link: u'http://.../~ubuntu-team'
+ name: 'primary'
+ owner_link: 'http://.../~ubuntu-team'
private: False
- reference: u'ubuntutest'
+ reference: 'ubuntutest'
relative_build_score: 0
require_virtualized: False
- resource_type_link: u'http://.../#archive'
- self_link: u'http://.../ubuntutest/+archive/primary'
+ resource_type_link: 'http://.../#archive'
+ self_link: 'http://.../ubuntutest/+archive/primary'
signing_key_fingerprint: None
suppress_subscription_notifications: False
- web_link: u'http://launchpad.../ubuntutest/+archive/primary'
+ web_link: 'http://launchpad.../ubuntutest/+archive/primary'
A distribution can also provide a list of all its archives:
@@ -175,14 +175,14 @@ This is a permission that allows a team to upload to a component:
... '?type=component&item=main')
>>> ubuntu_main_permission = webservice.get(url).jsonBody()
>>> pprint_entry(ubuntu_main_permission)
- archive_link: u'http://.../ubuntu/+archive/primary'
- component_name: u'main'
+ archive_link: 'http://.../ubuntu/+archive/primary'
+ component_name: 'main'
date_created: ...
- permission: u'Archive Upload Rights'
- person_link: u'http://.../~ubuntu-team'
+ permission: 'Archive Upload Rights'
+ person_link: 'http://.../~ubuntu-team'
pocket: None
resource_type_link: ...
- self_link: u'http://.../ubuntu/+archive/primary/+upload/ubuntu-team?type=component&item=main'
+ self_link: 'http://.../ubuntu/+archive/primary/+upload/ubuntu-team?type=component&item=main'
source_package_name: None
This is a permission that allows an individual to upload a source package.
@@ -191,16 +191,16 @@ This is a permission that allows an individual to upload a source package.
... '?type=packagename&item=mozilla-firefox')
>>> carlos_mozilla_permission = webservice.get(url).jsonBody()
>>> pprint_entry(carlos_mozilla_permission)
- archive_link: u'http://.../ubuntu/+archive/primary'
+ archive_link: 'http://.../ubuntu/+archive/primary'
component_name: None
date_created: ...
- permission: u'Archive Upload Rights'
- person_link: u'http://.../~carlos'
+ permission: 'Archive Upload Rights'
+ person_link: 'http://.../~carlos'
pocket: None
resource_type_link: ...
self_link:
- u'http://.../ubuntu/+archive/primary/+upload/carlos?type=packagename&item=mozilla-firefox'
- source_package_name: u'mozilla-firefox'
+ 'http://.../ubuntu/+archive/primary/+upload/carlos?type=packagename&item=mozilla-firefox'
+ source_package_name: 'mozilla-firefox'
This is a queue admin right for ubuntu-team:
@@ -208,15 +208,15 @@ This is a queue admin right for ubuntu-team:
... '?type=component&item=main')
>>> ubuntu_main_permission = webservice.get(url).jsonBody()
>>> pprint_entry(ubuntu_main_permission)
- archive_link: u'http://.../ubuntu/+archive/primary'
- component_name: u'main'
+ archive_link: 'http://.../ubuntu/+archive/primary'
+ component_name: 'main'
date_created: ...
- permission: u'Queue Administration Rights'
- person_link: u'http://.../~ubuntu-team'
+ permission: 'Queue Administration Rights'
+ person_link: 'http://.../~ubuntu-team'
pocket: None
resource_type_link: ...
self_link:
- u'http://.../ubuntu/+archive/primary/+queue-admin/ubuntu-team?type=component&item=main'
+ 'http://.../ubuntu/+archive/primary/+queue-admin/ubuntu-team?type=component&item=main'
source_package_name: None
And one for an individual:
@@ -225,15 +225,15 @@ And one for an individual:
... '?type=component&item=universe')
>>> name16_admin_permission = webservice.get(url).jsonBody()
>>> pprint_entry(name16_admin_permission)
- archive_link: u'http://.../ubuntu/+archive/primary'
- component_name: u'universe'
+ archive_link: 'http://.../ubuntu/+archive/primary'
+ component_name: 'universe'
date_created: ...
- permission: u'Queue Administration Rights'
- person_link: u'http://.../~name12'
+ permission: 'Queue Administration Rights'
+ person_link: 'http://.../~name12'
pocket: None
resource_type_link: ...
self_link:
- u'http://.../ubuntu/+archive/primary/+queue-admin/name12?type=component&item=universe'
+ 'http://.../ubuntu/+archive/primary/+queue-admin/name12?type=component&item=universe'
source_package_name: None
@@ -1191,44 +1191,44 @@ attributes are only exposed when the requestor has View permission in
the IArchive context, in this case only Celso has it.
>>> pprint_entry(user_webservice.get("/~cprov/+archive/ubuntu/p3a").jsonBody())
- authorized_size: u'tag:launchpad.net:2008:redacted'
+ authorized_size: 'tag:launchpad.net:2008:redacted'
dependencies_collection_link:
- u'http://.../~cprov/+archive/ubuntu/p3a/dependencies'
- description: u'tag:launchpad.net:2008:redacted'
- displayname: u'PPA named p3a for Celso Providelo'
- distribution_link: u'http://.../ubuntu'
- external_dependencies: u'tag:launchpad.net:2008:redacted'
- name: u'p3a'
- owner_link: u'http://.../~cprov'
+ 'http://.../~cprov/+archive/ubuntu/p3a/dependencies'
+ description: 'tag:launchpad.net:2008:redacted'
+ displayname: 'PPA named p3a for Celso Providelo'
+ distribution_link: 'http://.../ubuntu'
+ external_dependencies: 'tag:launchpad.net:2008:redacted'
+ name: 'p3a'
+ owner_link: 'http://.../~cprov'
private: True
- reference: u'~cprov/ubuntu/p3a'
+ reference: '~cprov/ubuntu/p3a'
relative_build_score: 0
- require_virtualized: u'tag:launchpad.net:2008:redacted'
- resource_type_link: u'http://.../#archive'
- self_link: u'http://.../~cprov/+archive/ubuntu/p3a'
- signing_key_fingerprint: u'tag:launchpad.net:2008:redacted'
+ require_virtualized: 'tag:launchpad.net:2008:redacted'
+ resource_type_link: 'http://.../#archive'
+ self_link: 'http://.../~cprov/+archive/ubuntu/p3a'
+ signing_key_fingerprint: 'tag:launchpad.net:2008:redacted'
suppress_subscription_notifications: False
- web_link: u'http://launchpad.../~cprov/+archive/ubuntu/p3a'
+ web_link: 'http://launchpad.../~cprov/+archive/ubuntu/p3a'
>>> pprint_entry(cprov_webservice.get("/~cprov/+archive/ubuntu/p3a").jsonBody())
authorized_size: 2048
dependencies_collection_link:
- u'http://.../~cprov/+archive/ubuntu/p3a/dependencies'
- description: u'packages to help my friends.'
- displayname: u'PPA named p3a for Celso Providelo'
- distribution_link: u'http://.../ubuntu'
+ 'http://.../~cprov/+archive/ubuntu/p3a/dependencies'
+ description: 'packages to help my friends.'
+ displayname: 'PPA named p3a for Celso Providelo'
+ distribution_link: 'http://.../ubuntu'
external_dependencies: None
- name: u'p3a'
- owner_link: u'http://.../~cprov'
+ name: 'p3a'
+ owner_link: 'http://.../~cprov'
private: True
- reference: u'~cprov/ubuntu/p3a'
+ reference: '~cprov/ubuntu/p3a'
relative_build_score: 0
require_virtualized: True
- resource_type_link: u'http://.../#archive'
- self_link: u'http://.../~cprov/+archive/ubuntu/p3a'
- signing_key_fingerprint: u'ABCDEF0123456789ABCDDCBA0000111112345678'
+ resource_type_link: 'http://.../#archive'
+ self_link: 'http://.../~cprov/+archive/ubuntu/p3a'
+ signing_key_fingerprint: 'ABCDEF0123456789ABCDDCBA0000111112345678'
suppress_subscription_notifications: False
- web_link: u'http://launchpad.../~cprov/+archive/ubuntu/p3a'
+ web_link: 'http://launchpad.../~cprov/+archive/ubuntu/p3a'
Creating subscriptions to a (private) archive
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1277,16 +1277,16 @@ We publish a subset of the IArchiveSubscriber attributes.
>>> new_subscription = cprov_webservice.get(
... response.getHeader('Location')).jsonBody()
>>> pprint_entry(new_subscription)
- archive_link: u'http://api.launchpad.test/beta/~cprov/+archive/ubuntu/p3a'
+ archive_link: 'http://api.launchpad.test/beta/~cprov/+archive/ubuntu/p3a'
date_created: ...
date_expires: None
description: None
- registrant_link: u'http://api.launchpad.test/beta/~cprov'
- resource_type_link: u'http://api.launchpad.test/beta/#archive_subscriber'
- self_link: u'http://api.../~cprov/+archive/ubuntu/p3a/+subscriptions/mark'
- status: u'Active'
- subscriber_link: u'http://api.launchpad.test/beta/~mark'
- web_link: u'http://launchpad.../~cprov/+archive/ubuntu/p3a/+subscriptions/mark'
+ registrant_link: 'http://api.launchpad.test/beta/~cprov'
+ resource_type_link: 'http://api.launchpad.test/beta/#archive_subscriber'
+ self_link: 'http://api.../~cprov/+archive/ubuntu/p3a/+subscriptions/mark'
+ status: 'Active'
+ subscriber_link: 'http://api.launchpad.test/beta/~mark'
+ web_link: 'http://launchpad.../~cprov/+archive/ubuntu/p3a/+subscriptions/mark'
Other webservice users cannot view the subscription.
@@ -1448,14 +1448,14 @@ attributes.
... '/~cprov/+archive/ubuntu/ppa', 'getArchiveDependency',
... dependency=ubuntu['main_archive_link']).jsonBody()
>>> pprint_entry(cprov_main_dependency)
- archive_link: u'http://.../~cprov/+archive/ubuntu/ppa'
- component_name: u'universe'
+ archive_link: 'http://.../~cprov/+archive/ubuntu/ppa'
+ component_name: 'universe'
date_created: ...
- dependency_link: u'http://.../ubuntu/+archive/primary'
- pocket: u'Release'
- resource_type_link: u'http://.../#archive_dependency'
- self_link: u'http://.../~cprov/+archive/ubuntu/ppa/+dependency/1'
- title: u'Primary Archive for Ubuntu Linux - RELEASE (main, universe)'
+ dependency_link: 'http://.../ubuntu/+archive/primary'
+ pocket: 'Release'
+ resource_type_link: 'http://.../#archive_dependency'
+ self_link: 'http://.../~cprov/+archive/ubuntu/ppa/+dependency/1'
+ title: 'Primary Archive for Ubuntu Linux - RELEASE (main, universe)'
Asking for an archive on which there is no dependency returns None.
diff --git a/lib/lp/soyuz/stories/webservice/xx-binary-package-publishing.txt b/lib/lp/soyuz/stories/webservice/xx-binary-package-publishing.txt
index 0d04c43..2b0fc7d 100644
--- a/lib/lp/soyuz/stories/webservice/xx-binary-package-publishing.txt
+++ b/lib/lp/soyuz/stories/webservice/xx-binary-package-publishing.txt
@@ -66,30 +66,30 @@ Each binary publication exposes a number of properties:
>>> from lazr.restful.testing.webservice import pprint_entry
>>> pprint_entry(pubs['entries'][0])
architecture_specific: True
- archive_link: u'http://.../~cprov/+archive/ubuntu/ppa'
- binary_package_name: u'mozilla-firefox'
- binary_package_version: u'1.0'
- build_link: u'http://.../~cprov/+archive/ubuntu/ppa/+build/28'
- component_name: u'main'
+ archive_link: 'http://.../~cprov/+archive/ubuntu/ppa'
+ binary_package_name: 'mozilla-firefox'
+ binary_package_version: '1.0'
+ build_link: 'http://.../~cprov/+archive/ubuntu/ppa/+build/28'
+ component_name: 'main'
copied_from_archive_link: None
creator_link: None
- date_created: u'2007-08-10T13:00:00+00:00'
+ date_created: '2007-08-10T13:00:00+00:00'
date_made_pending: None
- date_published: u'2007-08-10T13:00:01+00:00'
+ date_published: '2007-08-10T13:00:01+00:00'
date_removed: None
date_superseded: None
- display_name: u'mozilla-firefox 1.0 in warty hppa'
- distro_arch_series_link: u'http://.../ubuntu/warty/hppa'
+ display_name: 'mozilla-firefox 1.0 in warty hppa'
+ distro_arch_series_link: 'http://.../ubuntu/warty/hppa'
phased_update_percentage: None
- pocket: u'Release'
- priority_name: u'IMPORTANT'
+ pocket: 'Release'
+ priority_name: 'IMPORTANT'
removal_comment: None
removed_by_link: None
- resource_type_link: u'http://.../#binary_package_publishing_history'
+ resource_type_link: 'http://.../#binary_package_publishing_history'
scheduled_deletion_date: None
- section_name: u'base'
- self_link: u'http://.../~cprov/+archive/ubuntu/ppa/+binarypub/30'
- status: u'Published'
+ section_name: 'base'
+ self_link: 'http://.../~cprov/+archive/ubuntu/ppa/+binarypub/30'
+ status: 'Published'
Security
@@ -186,14 +186,14 @@ Detailed download counts are also available from the getDownloadCounts method.
A detailed count object can be retrieved by its URL.
>>> pprint_entry(webservice.get(counts[1]['self_link']).jsonBody())
- archive_link: u'http://.../~cprov/+archive/ubuntu/ppa'
- binary_package_name: u'mozilla-firefox'
- binary_package_version: u'1.0'
+ archive_link: 'http://.../~cprov/+archive/ubuntu/ppa'
+ binary_package_name: 'mozilla-firefox'
+ binary_package_version: '1.0'
count: 10
- country_link: u'http://.../+countries/AU'
- day: u'2010-02-21'
- resource_type_link: u'http://.../#binary_package_release_download_count'
- self_link: u'http://.../~cprov/+archive/ubuntu/ppa/+binaryhits/mozilla-firefox/1.0/hppa/2010-02-21/AU'
+ country_link: 'http://.../+countries/AU'
+ day: '2010-02-21'
+ resource_type_link: 'http://.../#binary_package_release_download_count'
+ self_link: 'http://.../~cprov/+archive/ubuntu/ppa/+binaryhits/mozilla-firefox/1.0/hppa/2010-02-21/AU'
We can also filter by date.
@@ -204,14 +204,14 @@ We can also filter by date.
1
>>> pprint_entry(webservice.get(counts[0]['self_link']).jsonBody())
- archive_link: u'http://.../~cprov/+archive/ubuntu/ppa'
- binary_package_name: u'mozilla-firefox'
- binary_package_version: u'1.0'
+ archive_link: 'http://.../~cprov/+archive/ubuntu/ppa'
+ binary_package_name: 'mozilla-firefox'
+ binary_package_version: '1.0'
count: 8
country_link: None
- day: u'2010-02-23'
- resource_type_link: u'http://.../#binary_package_release_download_count'
- self_link: u'http://.../~cprov/+archive/ubuntu/ppa/+binaryhits/mozilla-firefox/1.0/hppa/2010-02-23/unknown'
+ day: '2010-02-23'
+ resource_type_link: 'http://.../#binary_package_release_download_count'
+ self_link: 'http://.../~cprov/+archive/ubuntu/ppa/+binaryhits/mozilla-firefox/1.0/hppa/2010-02-23/unknown'
But other URLs result in a 404.
diff --git a/lib/lp/soyuz/stories/webservice/xx-builds.txt b/lib/lp/soyuz/stories/webservice/xx-builds.txt
index 78f3b97..b337f66 100644
--- a/lib/lp/soyuz/stories/webservice/xx-builds.txt
+++ b/lib/lp/soyuz/stories/webservice/xx-builds.txt
@@ -43,32 +43,32 @@ of properties:
>>> from lazr.restful.testing.webservice import pprint_entry
>>> pprint_entry(builds['entries'][0])
- arch_tag: u'i386'
- archive_link: u'http://.../beta/~cprov/+archive/ubuntu/ppa'
- builder_link: u'http://.../beta/builders/bob'
+ arch_tag: 'i386'
+ archive_link: 'http://.../beta/~cprov/+archive/ubuntu/ppa'
+ builder_link: 'http://.../beta/builders/bob'
can_be_cancelled: False
can_be_rescored: False
can_be_retried: True
changesfile_url: None
current_source_publication_link:
- u'http://.../beta/~cprov/+archive/ubuntu/ppa/+sourcepub/27'
- date_created: u'2007-07-08T00:00:00+00:00'
- date_finished: u'2007-07-08T00:00:01+00:00'
+ 'http://.../beta/~cprov/+archive/ubuntu/ppa/+sourcepub/27'
+ date_created: '2007-07-08T00:00:00+00:00'
+ date_finished: '2007-07-08T00:00:01+00:00'
date_first_dispatched: None
dependencies: None
- distribution_link: u'http://.../beta/ubuntu'
+ distribution_link: 'http://.../beta/ubuntu'
log_url:
- u'http://.../~cprov/+archive/ubuntu/ppa/+build/26/+files/netapplet-1.0.0.tar.gz'
- pocket: u'Release'
- resource_type_link: u'http://api.launchpad.test/beta/#build'
+ 'http://.../~cprov/+archive/ubuntu/ppa/+build/26/+files/netapplet-1.0.0.tar.gz'
+ pocket: 'Release'
+ resource_type_link: 'http://api.launchpad.test/beta/#build'
score: None
- self_link: u'http://api.launchpad.test/beta/~cprov/+archive/ubuntu/ppa/+build/26'
- source_package_name: u'cdrkit'
- source_package_version: u'1.0'
- status: u'Failed to build'
- title: u'i386 build of cdrkit 1.0 in ubuntu breezy-autotest RELEASE'
+ self_link: 'http://api.launchpad.test/beta/~cprov/+archive/ubuntu/ppa/+build/26'
+ source_package_name: 'cdrkit'
+ source_package_version: '1.0'
+ status: 'Failed to build'
+ title: 'i386 build of cdrkit 1.0 in ubuntu breezy-autotest RELEASE'
upload_log_url: None
- web_link: u'http://launchpad.../~cprov/+archive/ubuntu/ppa/+build/26'
+ web_link: 'http://launchpad.../~cprov/+archive/ubuntu/ppa/+build/26'
Whereas the 1.0 webservice for builds maintains the old property names
(without underscores):
@@ -76,67 +76,67 @@ Whereas the 1.0 webservice for builds maintains the old property names
>>> builds_1_0 = webservice.named_get(
... source_pub['self_link'].replace('beta', '1.0'), 'getBuilds')
>>> pprint_entry(builds_1_0.jsonBody()['entries'][0])
- arch_tag: u'i386'
- archive_link: u'http://.../~cprov/+archive/ubuntu/ppa'
+ arch_tag: 'i386'
+ archive_link: 'http://.../~cprov/+archive/ubuntu/ppa'
build_log_url:
- u'http://.../~cprov/+archive/ubuntu/ppa/+build/26/+files/netapplet-1.0.0.tar.gz'
- builder_link: u'http://.../builders/bob'
- buildstate: u'Failed to build'
+ 'http://.../~cprov/+archive/ubuntu/ppa/+build/26/+files/netapplet-1.0.0.tar.gz'
+ builder_link: 'http://.../builders/bob'
+ buildstate: 'Failed to build'
can_be_cancelled: False
can_be_rescored: False
can_be_retried: True
changesfile_url: None
current_source_publication_link:
- u'http://.../~cprov/+archive/ubuntu/ppa/+sourcepub/27'
+ 'http://.../~cprov/+archive/ubuntu/ppa/+sourcepub/27'
date_first_dispatched: None
- datebuilt: u'2007-07-08T00:00:01+00:00'
- datecreated: u'2007-07-08T00:00:00+00:00'
+ datebuilt: '2007-07-08T00:00:01+00:00'
+ datecreated: '2007-07-08T00:00:00+00:00'
dependencies: None
- distribution_link: u'http://.../ubuntu'
- pocket: u'Release'
- resource_type_link: u'http://.../#build'
+ distribution_link: 'http://.../ubuntu'
+ pocket: 'Release'
+ resource_type_link: 'http://.../#build'
score: None
- self_link: u'http://.../~cprov/+archive/ubuntu/ppa/+build/26'
- source_package_name: u'cdrkit'
- source_package_version: u'1.0'
- title: u'i386 build of cdrkit 1.0 in ubuntu breezy-autotest RELEASE'
+ self_link: 'http://.../~cprov/+archive/ubuntu/ppa/+build/26'
+ source_package_name: 'cdrkit'
+ source_package_version: '1.0'
+ title: 'i386 build of cdrkit 1.0 in ubuntu breezy-autotest RELEASE'
upload_log_url: None
- web_link: u'http://launchpad.../~cprov/+archive/ubuntu/ppa/+build/26'
+ web_link: 'http://launchpad.../~cprov/+archive/ubuntu/ppa/+build/26'
devel webservice also contains build date_started and duration.
>>> builds_devel = webservice.named_get(
... source_pub['self_link'].replace('beta', 'devel'), 'getBuilds')
>>> pprint_entry(builds_devel.jsonBody()['entries'][0])
- arch_tag: u'i386'
- archive_link: u'http://.../~cprov/+archive/ubuntu/ppa'
+ arch_tag: 'i386'
+ archive_link: 'http://.../~cprov/+archive/ubuntu/ppa'
build_log_url:
- u'http://.../~cprov/+archive/ubuntu/ppa/+build/26/+files/netapplet-1.0.0.tar.gz'
- builder_link: u'http://.../builders/bob'
- buildstate: u'Failed to build'
+ 'http://.../~cprov/+archive/ubuntu/ppa/+build/26/+files/netapplet-1.0.0.tar.gz'
+ builder_link: 'http://.../builders/bob'
+ buildstate: 'Failed to build'
can_be_cancelled: False
can_be_rescored: False
can_be_retried: True
changesfile_url: None
current_source_publication_link:
- u'http://.../~cprov/+archive/ubuntu/ppa/+sourcepub/27'
+ 'http://.../~cprov/+archive/ubuntu/ppa/+sourcepub/27'
date_first_dispatched: None
- date_started: u'2007-07-07T23:58:41+00:00'
- datebuilt: u'2007-07-08T00:00:01+00:00'
- datecreated: u'2007-07-08T00:00:00+00:00'
+ date_started: '2007-07-07T23:58:41+00:00'
+ datebuilt: '2007-07-08T00:00:01+00:00'
+ datecreated: '2007-07-08T00:00:00+00:00'
dependencies: None
- distribution_link: u'http://.../ubuntu'
- duration: u'0:01:20'
+ distribution_link: 'http://.../ubuntu'
+ duration: '0:01:20'
external_dependencies: None
- pocket: u'Release'
- resource_type_link: u'http://.../#build'
+ pocket: 'Release'
+ resource_type_link: 'http://.../#build'
score: None
- self_link: u'http://.../~cprov/+archive/ubuntu/ppa/+build/26'
- source_package_name: u'cdrkit'
- source_package_version: u'1.0'
- title: u'i386 build of cdrkit 1.0 in ubuntu breezy-autotest RELEASE'
+ self_link: 'http://.../~cprov/+archive/ubuntu/ppa/+build/26'
+ source_package_name: 'cdrkit'
+ source_package_version: '1.0'
+ title: 'i386 build of cdrkit 1.0 in ubuntu breezy-autotest RELEASE'
upload_log_url: None
- web_link: u'http://launchpad.../~cprov/+archive/ubuntu/ppa/+build/26'
+ web_link: 'http://launchpad.../~cprov/+archive/ubuntu/ppa/+build/26'
For testing purposes we will set 'buildlog' and 'upload_log' to the
diff --git a/lib/lp/soyuz/stories/webservice/xx-distroarchseries.txt b/lib/lp/soyuz/stories/webservice/xx-distroarchseries.txt
index f094a17..a2a320b 100644
--- a/lib/lp/soyuz/stories/webservice/xx-distroarchseries.txt
+++ b/lib/lp/soyuz/stories/webservice/xx-distroarchseries.txt
@@ -34,21 +34,21 @@ For a distroarchseries we publish a subset of its attributes.
>>> from lazr.restful.testing.webservice import pprint_entry
>>> pprint_entry(distroarchseries)
- architecture_tag: u'i386'
- chroot_url: u'http://.../.../filename...'
- display_name: u'Ubuntu Hoary i386'
- distroseries_link: u'http://.../ubuntu/hoary'
+ architecture_tag: 'i386'
+ chroot_url: 'http://.../.../filename...'
+ display_name: 'Ubuntu Hoary i386'
+ distroseries_link: 'http://.../ubuntu/hoary'
is_nominated_arch_indep: True
- main_archive_link: u'http://.../ubuntu/+archive/primary'
+ main_archive_link: 'http://.../ubuntu/+archive/primary'
official: True
- owner_link: u'http://.../~mark'
+ owner_link: 'http://.../~mark'
package_count: 1
- processor_link: u'http://.../+processors/386'
- resource_type_link: u'http://.../#distro_arch_series'
- self_link: u'http://.../ubuntu/hoary/i386'
+ processor_link: 'http://.../+processors/386'
+ resource_type_link: 'http://.../#distro_arch_series'
+ self_link: 'http://.../ubuntu/hoary/i386'
supports_virtualized: True
- title: u'The Hoary Hedgehog Release for i386 (386)'
- web_link: u'http://launchpad.../ubuntu/hoary/i386'
+ title: 'The Hoary Hedgehog Release for i386 (386)'
+ web_link: 'http://launchpad.../ubuntu/hoary/i386'
DistroArchSeries.enabled is published in the API devel version.
@@ -56,19 +56,19 @@ DistroArchSeries.enabled is published in the API devel version.
... "/ubuntu/hoary/i386", api_version='devel').jsonBody()
>>> pprint_entry(distroarchseries)
- architecture_tag: u'i386'
- chroot_url: u'http://.../.../filename...'
- display_name: u'Ubuntu Hoary i386'
- distroseries_link: u'http://.../ubuntu/hoary'
+ architecture_tag: 'i386'
+ chroot_url: 'http://.../.../filename...'
+ display_name: 'Ubuntu Hoary i386'
+ distroseries_link: 'http://.../ubuntu/hoary'
enabled: True
is_nominated_arch_indep: True
- main_archive_link: u'http://.../ubuntu/+archive/primary'
+ main_archive_link: 'http://.../ubuntu/+archive/primary'
official: True
- owner_link: u'http://.../~mark'
+ owner_link: 'http://.../~mark'
package_count: 1
- processor_link: u'http://.../+processors/386'
- resource_type_link: u'http://.../#distro_arch_series'
- self_link: u'http://.../ubuntu/hoary/i386'
+ processor_link: 'http://.../+processors/386'
+ resource_type_link: 'http://.../#distro_arch_series'
+ self_link: 'http://.../ubuntu/hoary/i386'
supports_virtualized: True
- title: u'The Hoary Hedgehog Release for i386 (386)'
- web_link: u'http://launchpad.../ubuntu/hoary/i386'
+ title: 'The Hoary Hedgehog Release for i386 (386)'
+ web_link: 'http://launchpad.../ubuntu/hoary/i386'
diff --git a/lib/lp/soyuz/stories/webservice/xx-hasbuildrecords.txt b/lib/lp/soyuz/stories/webservice/xx-hasbuildrecords.txt
index 228d20a..3246cca 100644
--- a/lib/lp/soyuz/stories/webservice/xx-hasbuildrecords.txt
+++ b/lib/lp/soyuz/stories/webservice/xx-hasbuildrecords.txt
@@ -44,9 +44,9 @@ An entry can be selected in the returned collection.
>>> from lazr.restful.testing.webservice import pprint_entry
>>> pprint_entry(sorted(ppa_builds['entries'])[0])
- arch_tag: u'hppa'
+ arch_tag: 'hppa'
...
- title: u'hppa build of mozilla-firefox 0.9 in ubuntu warty RELEASE'
+ title: 'hppa build of mozilla-firefox 0.9 in ubuntu warty RELEASE'
...
Builds can be filtered by their 'build_state'.
diff --git a/lib/lp/soyuz/stories/webservice/xx-packageset.txt b/lib/lp/soyuz/stories/webservice/xx-packageset.txt
index 3f20395..5622b17 100644
--- a/lib/lp/soyuz/stories/webservice/xx-packageset.txt
+++ b/lib/lp/soyuz/stories/webservice/xx-packageset.txt
@@ -594,16 +594,16 @@ Let's see what we've got:
>>> new_permission = webservice.get(
... response.getHeader('Location')).jsonBody()
>>> pprint_entry(new_permission)
- archive_link: u'http://.../+archive/primary'
+ archive_link: 'http://.../+archive/primary'
component_name: None
date_created: ...
explicit: False
- package_set_name: u'firefox'
- permission: u'Archive Upload Rights'
- person_link: u'http://.../~name12'
+ package_set_name: 'firefox'
+ permission: 'Archive Upload Rights'
+ person_link: 'http://.../~name12'
pocket: None
resource_type_link: ...
- self_link: u'http://.../+archive/primary/+upload/name12?type=packageset&item=firefox&series=hoary'
+ self_link: 'http://.../+archive/primary/+upload/name12?type=packageset&item=firefox&series=hoary'
source_package_name: None
Grant upload privileges to 'name12' for package set 'mozilla' in the Ubuntu
@@ -915,11 +915,11 @@ The user 'cprov' has no upload permission for 'thunderbird' in 'hoary'.
... '?type=packageset&item=thunderbird&series=hoary')
>>> permission = webservice.get(url).jsonBody()
>>> pprint_entry(permission)
- archive_link: u'http://api.launchpad.test/beta/ubuntu/+archive/primary'
+ archive_link: 'http://api.launchpad.test/beta/ubuntu/+archive/primary'
...
- distro_series_name: u'hoary'
+ distro_series_name: 'hoary'
...
- package_set_name: u'thunderbird'
- permission: u'Archive Upload Rights'
- person_link: u'http://api.launchpad.test/beta/~cprov'
+ package_set_name: 'thunderbird'
+ permission: 'Archive Upload Rights'
+ person_link: 'http://api.launchpad.test/beta/~cprov'
...
diff --git a/lib/lp/soyuz/stories/webservice/xx-packageupload.txt b/lib/lp/soyuz/stories/webservice/xx-packageupload.txt
index f01a270..e88c342 100644
--- a/lib/lp/soyuz/stories/webservice/xx-packageupload.txt
+++ b/lib/lp/soyuz/stories/webservice/xx-packageupload.txt
@@ -18,19 +18,19 @@ Each record exposes a number of properties.
>>> from lazr.restful.testing.webservice import pprint_entry
>>> pprint_entry(uploads['entries'][0])
- archive_link: u'http://.../ubuntu/+archive/primary'
+ archive_link: 'http://.../ubuntu/+archive/primary'
copy_source_archive_link: None
custom_file_urls: []
date_created: ...
- display_arches: u'source'
- display_name: u'mozilla-firefox'
- display_version: u'0.9'
- distroseries_link: u'http://.../ubuntu/warty'
+ display_arches: 'source'
+ display_name: 'mozilla-firefox'
+ display_version: '0.9'
+ distroseries_link: 'http://.../ubuntu/warty'
id: 11
- pocket: u'Release'
- resource_type_link: u'http://.../#package_upload'
- self_link: u'http://.../ubuntu/warty/+upload/11'
- status: u'Done'
+ pocket: 'Release'
+ resource_type_link: 'http://.../#package_upload'
+ self_link: 'http://.../ubuntu/warty/+upload/11'
+ status: 'Done'
getPackageUploads can filter on package names.
diff --git a/lib/lp/soyuz/stories/webservice/xx-source-package-publishing.txt b/lib/lp/soyuz/stories/webservice/xx-source-package-publishing.txt
index b26e605..4a8e1eb 100644
--- a/lib/lp/soyuz/stories/webservice/xx-source-package-publishing.txt
+++ b/lib/lp/soyuz/stories/webservice/xx-source-package-publishing.txt
@@ -119,32 +119,32 @@ publication to play with first.
>>> from lazr.restful.testing.webservice import pprint_entry
>>> pprint_entry(pubs['entries'][0])
- archive_link: u'http://.../~cprov/+archive/ubuntu/ppa'
- component_name: u'main'
+ archive_link: 'http://.../~cprov/+archive/ubuntu/ppa'
+ component_name: 'main'
copied_from_archive_link: None
- creator_link: u'http://api.launchpad.test/beta/~name16'
+ creator_link: 'http://api.launchpad.test/beta/~name16'
date_created: ...
date_made_pending: None
date_published: None
date_removed: None
date_superseded: None
- display_name: u'testwebservice 666 in breezy-autotest'
- distro_series_link: u'http://.../ubuntutest/breezy-autotest'
- package_creator_link: u'http://.../beta/~name16'
- package_maintainer_link: u'http://.../beta/~name16'
- package_signer_link: u'http://.../beta/~name16'
+ display_name: 'testwebservice 666 in breezy-autotest'
+ distro_series_link: 'http://.../ubuntutest/breezy-autotest'
+ package_creator_link: 'http://.../beta/~name16'
+ package_maintainer_link: 'http://.../beta/~name16'
+ package_signer_link: 'http://.../beta/~name16'
packageupload_link: None
- pocket: u'Release'
+ pocket: 'Release'
removal_comment: None
removed_by_link: None
- resource_type_link: u'http://.../#source_package_publishing_history'
+ resource_type_link: 'http://.../#source_package_publishing_history'
scheduled_deletion_date: None
- section_name: u'base'
- self_link: u'http://.../~cprov/+archive/ubuntu/ppa/+sourcepub/...'
- source_package_name: u'testwebservice'
- source_package_version: u'666'
+ section_name: 'base'
+ self_link: 'http://.../~cprov/+archive/ubuntu/ppa/+sourcepub/...'
+ source_package_name: 'testwebservice'
+ source_package_version: '666'
sponsor_link: None
- status: u'Pending'
+ status: 'Pending'
>>> webservice.named_get(
... pubs['entries'][0]['self_link'], 'changesFileUrl').jsonBody()
diff --git a/lib/lp/translations/stories/webservice/xx-potemplate.txt b/lib/lp/translations/stories/webservice/xx-potemplate.txt
index 327a66a..032ab5b 100644
--- a/lib/lp/translations/stories/webservice/xx-potemplate.txt
+++ b/lib/lp/translations/stories/webservice/xx-potemplate.txt
@@ -12,23 +12,23 @@ Anonymous users have read access to PO templates attributes.
... '/ubuntu/hoary/+source/pmount/+pots/pmount').jsonBody()
>>> pprint_entry(potemplate)
active: True
- date_last_updated: u'2005-05-06T20:09:23.775993+00:00'
+ date_last_updated: '2005-05-06T20:09:23.775993+00:00'
description: None
exported_in_languagepacks: True
- format: u'PO format'
+ format: 'PO format'
id: 2
language_count: 9
message_count: 63
- name: u'pmount'
- owner_link: u'http://.../~rosetta-admins'
- path: u'po/template.pot'
+ name: 'pmount'
+ owner_link: 'http://.../~rosetta-admins'
+ path: 'po/template.pot'
priority: 0
- resource_type_link: u'http://.../#translation_template'
- self_link: u'http://.../ubuntu/hoary/+source/pmount/+pots/pmount'
- translation_domain: u'pmount'
+ resource_type_link: 'http://.../#translation_template'
+ self_link: 'http://.../ubuntu/hoary/+source/pmount/+pots/pmount'
+ translation_domain: 'pmount'
translation_files_collection_link:
- u'http://.../pmount/+pots/pmount/translation_files'
- web_link: u'http://translati.../ubuntu/hoary/+source/pmount/+pots/pmount'
+ 'http://.../pmount/+pots/pmount/translation_files'
+ web_link: 'http://translati.../ubuntu/hoary/+source/pmount/+pots/pmount'
"translation_files" will list all POFiles associated with this template.
References