Merge lp:~leonardr/launchpadlib/616055 into lp:launchpadlib

Proposed by Leonard Richardson
Status: Merged
Approved by: Brad Crittenden
Approved revision: 94
Merged at revision: 94
Proposed branch: lp:~leonardr/launchpadlib/616055
Merge into: lp:launchpadlib
Diff against target: 193 lines (+28/-22)
5 files modified
src/launchpadlib/NEWS.txt (+2/-2)
src/launchpadlib/docs/hosted-files.txt (+1/-1)
src/launchpadlib/docs/introduction.txt (+6/-6)
src/launchpadlib/docs/people.txt (+1/-1)
src/launchpadlib/docs/toplevel.txt (+18/-12)
To merge this branch: bzr merge lp:~leonardr/launchpadlib/616055
Reviewer Review Type Date Requested Status
Brad Crittenden (community) code Approve
Review via email: mp+32352@code.launchpad.net

Description of the change

This branch makes minor updates to the launchpadlib tests to fix test failures caused by updates to lazr.restfulclient.

These tests run against Launchpad, so they must be run within the context of a Launchpad installation, with "bin/test -vvt launchpadlib"

To post a comment you must log in.
lp:~leonardr/launchpadlib/616055 updated
94. By Leonard Richardson

Prep for release.

Revision history for this message
Leonard Richardson (leonardr) wrote :

(In case you didn't know, before running bin/test you need to link the launchpadlib directory to the Launchpad top-level directory and add it to your buildout.cfg.)

Revision history for this message
Brad Crittenden (bac) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/launchpadlib/NEWS.txt'
2--- src/launchpadlib/NEWS.txt 2010-07-19 18:38:21 +0000
3+++ src/launchpadlib/NEWS.txt 2010-08-11 16:49:41 +0000
4@@ -2,13 +2,13 @@
5 NEWS for launchpadlib
6 =====================
7
8-1.6.3 (Unreleased)
9+1.6.3 (2010-08-11)
10 ==================
11
12 - Improved the XSLT stylesheet to reflect Launchpad's more complex
13 top-level structure. [bug=286941]
14
15-- Test fixes. [bug=488448]
16+- Test fixes. [bug=488448,616055]
17
18 1.6.2 (2010-06-21)
19 ==================
20
21=== modified file 'src/launchpadlib/docs/hosted-files.txt'
22--- src/launchpadlib/docs/hosted-files.txt 2010-04-06 19:54:35 +0000
23+++ src/launchpadlib/docs/hosted-files.txt 2010-08-11 16:49:41 +0000
24@@ -55,7 +55,7 @@
25 >>> file_handle.close()
26 Traceback (most recent call last):
27 ...
28- HTTPError: HTTP Error 400: Bad Request
29+ BadRequest: HTTP Error 400: Bad Request
30 ...
31
32 == Caching ==
33
34=== modified file 'src/launchpadlib/docs/introduction.txt'
35--- src/launchpadlib/docs/introduction.txt 2010-02-15 16:34:26 +0000
36+++ src/launchpadlib/docs/introduction.txt 2010-08-11 16:49:41 +0000
37@@ -172,14 +172,14 @@
38 >>> launchpad.me
39 Traceback (most recent call last):
40 ...
41- HTTPError: HTTP Error 401: Unauthorized
42+ Unauthorized: HTTP Error 401: Unauthorized
43 ...
44
45 >>> salgado.display_name = "This won't work."
46 >>> salgado.lp_save()
47 Traceback (most recent call last):
48 ...
49- HTTPError: HTTP Error 401: Unauthorized
50+ Unauthorized: HTTP Error 401: Unauthorized
51 ...
52
53 Convenience
54@@ -196,7 +196,7 @@
55 >>> launchpad.me
56 Traceback (most recent call last):
57 ...
58- HTTPError: HTTP Error 401: Unauthorized
59+ Unauthorized: HTTP Error 401: Unauthorized
60 ...
61
62 Another function call is useful when the consumer name, access token
63@@ -470,7 +470,7 @@
64 >>> launchpad = Launchpad(credentials=credentials)
65 Traceback (most recent call last):
66 ...
67- HTTPError: HTTP Error 401: Unauthorized
68+ Unauthorized: HTTP Error 401: Unauthorized
69 ...
70
71 The application is not allowed to access Launchpad with a consumer
72@@ -483,7 +483,7 @@
73 >>> launchpad = Launchpad(credentials=credentials)
74 Traceback (most recent call last):
75 ...
76- HTTPError: HTTP Error 401: Unauthorized
77+ Unauthorized: HTTP Error 401: Unauthorized
78 ...
79
80 The application is not allowed to access Launchpad with a bad access secret.
81@@ -495,7 +495,7 @@
82 >>> launchpad = Launchpad(credentials=credentials)
83 Traceback (most recent call last):
84 ...
85- HTTPError: HTTP Error 401: Unauthorized
86+ Unauthorized: HTTP Error 401: Unauthorized
87 ...
88
89 Clean up
90
91=== modified file 'src/launchpadlib/docs/people.txt'
92--- src/launchpadlib/docs/people.txt 2009-11-03 13:50:27 +0000
93+++ src/launchpadlib/docs/people.txt 2010-08-11 16:49:41 +0000
94@@ -159,7 +159,7 @@
95 >>> launchpad.people.newTeam(name='bassists', display_name='Bass Gods')
96 Traceback (most recent call last):
97 ...
98- HTTPError: HTTP Error 400: Bad Request
99+ BadRequest: HTTP Error 400: Bad Request
100 ...
101
102 Actually, the exception contains other useful information.
103
104=== modified file 'src/launchpadlib/docs/toplevel.txt'
105--- src/launchpadlib/docs/toplevel.txt 2010-06-21 15:26:24 +0000
106+++ src/launchpadlib/docs/toplevel.txt 2010-08-11 16:49:41 +0000
107@@ -13,10 +13,16 @@
108 collections. The bug collection does lookups by bug ID.
109
110 >>> bug = launchpad.bugs[1]
111-
112-For most top-level collections, simply looking up an object will not
113-trigger an HTTP request. The HTTP request happens when you try to
114-access one of the object's properties.
115+ send: 'GET /.../bugs/1 ...'
116+ ...
117+
118+To avoid triggering an HTTP request when simply looking up an object,
119+you can use a different syntax:
120+
121+ >>> bug = launchpad.bugs(1)
122+
123+The HTTP request will happen when you need information that can only
124+be obtained from the web service.
125
126 >>> print bug.id
127 send: 'GET /.../bugs/1 ...'
128@@ -26,7 +32,7 @@
129 Let's look at some more collections. The project collection does
130 lookups by project name.
131
132- >>> project = launchpad.projects['firefox']
133+ >>> project = launchpad.projects('firefox')
134 >>> print project.name
135 send: 'GET /.../firefox ...'
136 ...
137@@ -34,7 +40,7 @@
138
139 The project group collection does lookups by project group name.
140
141- >>> group = launchpad.project_groups['gnome']
142+ >>> group = launchpad.project_groups('gnome')
143 >>> print group.name
144 send: 'GET /.../gnome ...'
145 ...
146@@ -42,7 +48,7 @@
147
148 The distribution collection does lookups by distribution name.
149
150- >>> distribution = launchpad.distributions['ubuntu']
151+ >>> distribution = launchpad.distributions('ubuntu')
152 >>> print distribution.name
153 send: 'GET /.../ubuntu ...'
154 ...
155@@ -51,13 +57,13 @@
156 The person collection does lookups by a person's Launchpad
157 name.
158
159- >>> person = launchpad.people['salgado']
160+ >>> person = launchpad.people('salgado')
161 >>> print person.name
162 send: 'GET /.../~salgado ...'
163 ...
164 salgado
165
166- >>> team = launchpad.people['rosetta-admins']
167+ >>> team = launchpad.people('rosetta-admins')
168 >>> print team.name
169 send: 'GET /1.0/~rosetta-admins ...'
170 ...
171@@ -77,11 +83,11 @@
172 True
173
174 The truth is that it doesn't know, not before making that HTTP
175-request. Until the HTTP request is made, launchpadlib assumes
176+request. Until an HTTP request is made, launchpadlib assumes
177 everything in launchpad.people[] is a team (since a team has strictly
178 more capabilities than a person).
179
180- >>> person2 = launchpad.people['salgado']
181+ >>> person2 = launchpad.people('salgado')
182 >>> 'default_membership_period' in person2.lp_attributes
183 True
184
185@@ -101,7 +107,7 @@
186 the HTTP request, and then cause an error if the object turns out not
187 to be a team.
188
189- >>> person3 = launchpad.people['salgado']
190+ >>> person3 = launchpad.people('salgado')
191 >>> person3.default_membership_period
192 Traceback (most recent call last):
193 AttributeError: 'Entry' object has no attribute 'default_membership_period'

Subscribers

People subscribed via source and target branches