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
=== modified file 'src/launchpadlib/NEWS.txt'
--- src/launchpadlib/NEWS.txt 2010-07-19 18:38:21 +0000
+++ src/launchpadlib/NEWS.txt 2010-08-11 16:49:41 +0000
@@ -2,13 +2,13 @@
2NEWS for launchpadlib2NEWS for launchpadlib
3=====================3=====================
44
51.6.3 (Unreleased)51.6.3 (2010-08-11)
6==================6==================
77
8- Improved the XSLT stylesheet to reflect Launchpad's more complex8- Improved the XSLT stylesheet to reflect Launchpad's more complex
9 top-level structure. [bug=286941]9 top-level structure. [bug=286941]
1010
11- Test fixes. [bug=488448]11- Test fixes. [bug=488448,616055]
1212
131.6.2 (2010-06-21)131.6.2 (2010-06-21)
14==================14==================
1515
=== modified file 'src/launchpadlib/docs/hosted-files.txt'
--- src/launchpadlib/docs/hosted-files.txt 2010-04-06 19:54:35 +0000
+++ src/launchpadlib/docs/hosted-files.txt 2010-08-11 16:49:41 +0000
@@ -55,7 +55,7 @@
55 >>> file_handle.close()55 >>> file_handle.close()
56 Traceback (most recent call last):56 Traceback (most recent call last):
57 ...57 ...
58 HTTPError: HTTP Error 400: Bad Request58 BadRequest: HTTP Error 400: Bad Request
59 ...59 ...
6060
61== Caching ==61== Caching ==
6262
=== modified file 'src/launchpadlib/docs/introduction.txt'
--- src/launchpadlib/docs/introduction.txt 2010-02-15 16:34:26 +0000
+++ src/launchpadlib/docs/introduction.txt 2010-08-11 16:49:41 +0000
@@ -172,14 +172,14 @@
172 >>> launchpad.me172 >>> launchpad.me
173 Traceback (most recent call last):173 Traceback (most recent call last):
174 ...174 ...
175 HTTPError: HTTP Error 401: Unauthorized175 Unauthorized: HTTP Error 401: Unauthorized
176 ...176 ...
177177
178 >>> salgado.display_name = "This won't work."178 >>> salgado.display_name = "This won't work."
179 >>> salgado.lp_save()179 >>> salgado.lp_save()
180 Traceback (most recent call last):180 Traceback (most recent call last):
181 ...181 ...
182 HTTPError: HTTP Error 401: Unauthorized182 Unauthorized: HTTP Error 401: Unauthorized
183 ...183 ...
184184
185Convenience185Convenience
@@ -196,7 +196,7 @@
196 >>> launchpad.me196 >>> launchpad.me
197 Traceback (most recent call last):197 Traceback (most recent call last):
198 ...198 ...
199 HTTPError: HTTP Error 401: Unauthorized199 Unauthorized: HTTP Error 401: Unauthorized
200 ...200 ...
201201
202Another function call is useful when the consumer name, access token202Another function call is useful when the consumer name, access token
@@ -470,7 +470,7 @@
470 >>> launchpad = Launchpad(credentials=credentials)470 >>> launchpad = Launchpad(credentials=credentials)
471 Traceback (most recent call last):471 Traceback (most recent call last):
472 ...472 ...
473 HTTPError: HTTP Error 401: Unauthorized473 Unauthorized: HTTP Error 401: Unauthorized
474 ...474 ...
475475
476The application is not allowed to access Launchpad with a consumer476The application is not allowed to access Launchpad with a consumer
@@ -483,7 +483,7 @@
483 >>> launchpad = Launchpad(credentials=credentials)483 >>> launchpad = Launchpad(credentials=credentials)
484 Traceback (most recent call last):484 Traceback (most recent call last):
485 ...485 ...
486 HTTPError: HTTP Error 401: Unauthorized486 Unauthorized: HTTP Error 401: Unauthorized
487 ...487 ...
488488
489The application is not allowed to access Launchpad with a bad access secret.489The application is not allowed to access Launchpad with a bad access secret.
@@ -495,7 +495,7 @@
495 >>> launchpad = Launchpad(credentials=credentials)495 >>> launchpad = Launchpad(credentials=credentials)
496 Traceback (most recent call last):496 Traceback (most recent call last):
497 ...497 ...
498 HTTPError: HTTP Error 401: Unauthorized498 Unauthorized: HTTP Error 401: Unauthorized
499 ...499 ...
500500
501Clean up501Clean up
502502
=== modified file 'src/launchpadlib/docs/people.txt'
--- src/launchpadlib/docs/people.txt 2009-11-03 13:50:27 +0000
+++ src/launchpadlib/docs/people.txt 2010-08-11 16:49:41 +0000
@@ -159,7 +159,7 @@
159 >>> launchpad.people.newTeam(name='bassists', display_name='Bass Gods')159 >>> launchpad.people.newTeam(name='bassists', display_name='Bass Gods')
160 Traceback (most recent call last):160 Traceback (most recent call last):
161 ...161 ...
162 HTTPError: HTTP Error 400: Bad Request162 BadRequest: HTTP Error 400: Bad Request
163 ...163 ...
164164
165Actually, the exception contains other useful information.165Actually, the exception contains other useful information.
166166
=== modified file 'src/launchpadlib/docs/toplevel.txt'
--- src/launchpadlib/docs/toplevel.txt 2010-06-21 15:26:24 +0000
+++ src/launchpadlib/docs/toplevel.txt 2010-08-11 16:49:41 +0000
@@ -13,10 +13,16 @@
13collections. The bug collection does lookups by bug ID.13collections. The bug collection does lookups by bug ID.
1414
15 >>> bug = launchpad.bugs[1]15 >>> bug = launchpad.bugs[1]
1616 send: 'GET /.../bugs/1 ...'
17For most top-level collections, simply looking up an object will not17 ...
18trigger an HTTP request. The HTTP request happens when you try to18
19access one of the object's properties.19To avoid triggering an HTTP request when simply looking up an object,
20you can use a different syntax:
21
22 >>> bug = launchpad.bugs(1)
23
24The HTTP request will happen when you need information that can only
25be obtained from the web service.
2026
21 >>> print bug.id27 >>> print bug.id
22 send: 'GET /.../bugs/1 ...'28 send: 'GET /.../bugs/1 ...'
@@ -26,7 +32,7 @@
26Let's look at some more collections. The project collection does32Let's look at some more collections. The project collection does
27lookups by project name.33lookups by project name.
2834
29 >>> project = launchpad.projects['firefox']35 >>> project = launchpad.projects('firefox')
30 >>> print project.name36 >>> print project.name
31 send: 'GET /.../firefox ...'37 send: 'GET /.../firefox ...'
32 ...38 ...
@@ -34,7 +40,7 @@
3440
35The project group collection does lookups by project group name.41The project group collection does lookups by project group name.
3642
37 >>> group = launchpad.project_groups['gnome']43 >>> group = launchpad.project_groups('gnome')
38 >>> print group.name44 >>> print group.name
39 send: 'GET /.../gnome ...'45 send: 'GET /.../gnome ...'
40 ...46 ...
@@ -42,7 +48,7 @@
4248
43The distribution collection does lookups by distribution name.49The distribution collection does lookups by distribution name.
4450
45 >>> distribution = launchpad.distributions['ubuntu']51 >>> distribution = launchpad.distributions('ubuntu')
46 >>> print distribution.name52 >>> print distribution.name
47 send: 'GET /.../ubuntu ...'53 send: 'GET /.../ubuntu ...'
48 ...54 ...
@@ -51,13 +57,13 @@
51The person collection does lookups by a person's Launchpad57The person collection does lookups by a person's Launchpad
52name.58name.
5359
54 >>> person = launchpad.people['salgado']60 >>> person = launchpad.people('salgado')
55 >>> print person.name61 >>> print person.name
56 send: 'GET /.../~salgado ...'62 send: 'GET /.../~salgado ...'
57 ...63 ...
58 salgado64 salgado
5965
60 >>> team = launchpad.people['rosetta-admins']66 >>> team = launchpad.people('rosetta-admins')
61 >>> print team.name67 >>> print team.name
62 send: 'GET /1.0/~rosetta-admins ...'68 send: 'GET /1.0/~rosetta-admins ...'
63 ...69 ...
@@ -77,11 +83,11 @@
77 True83 True
7884
79The truth is that it doesn't know, not before making that HTTP85The truth is that it doesn't know, not before making that HTTP
80request. Until the HTTP request is made, launchpadlib assumes86request. Until an HTTP request is made, launchpadlib assumes
81everything in launchpad.people[] is a team (since a team has strictly87everything in launchpad.people[] is a team (since a team has strictly
82more capabilities than a person).88more capabilities than a person).
8389
84 >>> person2 = launchpad.people['salgado']90 >>> person2 = launchpad.people('salgado')
85 >>> 'default_membership_period' in person2.lp_attributes91 >>> 'default_membership_period' in person2.lp_attributes
86 True92 True
8793
@@ -101,7 +107,7 @@
101the HTTP request, and then cause an error if the object turns out not107the HTTP request, and then cause an error if the object turns out not
102to be a team.108to be a team.
103109
104 >>> person3 = launchpad.people['salgado']110 >>> person3 = launchpad.people('salgado')
105 >>> person3.default_membership_period111 >>> person3.default_membership_period
106 Traceback (most recent call last):112 Traceback (most recent call last):
107 AttributeError: 'Entry' object has no attribute 'default_membership_period'113 AttributeError: 'Entry' object has no attribute 'default_membership_period'

Subscribers

People subscribed via source and target branches