Merge lp:~michael.nelson/launchpad/ppa-privatisation-test-refactor5 into lp:launchpad

Proposed by Michael Nelson
Status: Merged
Merged at revision: not available
Proposed branch: lp:~michael.nelson/launchpad/ppa-privatisation-test-refactor5
Merge into: lp:launchpad
Prerequisite: lp:~michael.nelson/launchpad/ppa-privatisation-test-refactor4
Diff against target: 821 lines (+218/-170)
6 files modified
lib/lp/soyuz/stories/ppa/xx-ppa-packages.txt (+56/-24)
lib/lp/soyuz/stories/ppa/xx-private-ppa-presentation.txt (+14/-11)
lib/lp/soyuz/stories/ppa/xx-private-ppa-subscription-stories.txt (+47/-41)
lib/lp/soyuz/stories/ppa/xx-private-ppa-subscriptions.txt (+32/-30)
lib/lp/soyuz/stories/ppa/xx-private-ppas.txt (+20/-14)
lib/lp/soyuz/stories/soyuz/xx-person-packages.txt (+49/-50)
To merge this branch: bzr merge lp:~michael.nelson/launchpad/ppa-privatisation-test-refactor5
Reviewer Review Type Date Requested Status
Abel Deuring (community) code Approve
Review via email: mp+20207@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Michael Nelson (michael.nelson) wrote :

This is the fifth branch in a series to refactor soyuz tests after fixing bug 506203.

The MP for the branch that actually fixed the bug is at:

https://code.edge.launchpad.net/~michael.nelson/launchpad/506203-ppa-privatisation-check/+merge/19415

The original fix ensures that the privacy of a PPA cannot be altered once it has packages published. Unfortunately most of our test infrastructure does exactly that (switches the privacy to do a few tests and then switches it back).

The complete test breakages are as follows:
http://pastebin.ubuntu.com/378292/

This branch fixes:

bin/test -vv -t xx-ppa-packages -t xx-private-ppa-presentation.txt -t xx-private-ppa-subscription-stories.txt -t xx-private-ppa-subscriptions.txt -t xx-private-ppas.txt -t xx-person-packages.txt

Thanks.

Revision history for this message
Abel Deuring (adeuring) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/lp/soyuz/stories/ppa/xx-ppa-packages.txt'
--- lib/lp/soyuz/stories/ppa/xx-ppa-packages.txt 2010-01-20 14:29:59 +0000
+++ lib/lp/soyuz/stories/ppa/xx-ppa-packages.txt 2010-02-26 15:48:21 +0000
@@ -134,7 +134,8 @@
134 >>> login('foo.bar@canonical.com')134 >>> login('foo.bar@canonical.com')
135 >>> from zope.component import getUtility135 >>> from zope.component import getUtility
136 >>> from lp.registry.interfaces.person import IPersonSet136 >>> from lp.registry.interfaces.person import IPersonSet
137 >>> cprov_ppa = getUtility(IPersonSet).getByName('cprov').archive137 >>> cprov = getUtility(IPersonSet).getByName('cprov')
138 >>> cprov_ppa = cprov.archive
138 >>> pmount_i386_pub = cprov_ppa.getAllPublishedBinaries(139 >>> pmount_i386_pub = cprov_ppa.getAllPublishedBinaries(
139 ... name='pmount', version='0.1-1')[1]140 ... name='pmount', version='0.1-1')[1]
140 >>> print pmount_i386_pub.displayname141 >>> print pmount_i386_pub.displayname
@@ -178,39 +179,70 @@
178 'http://launchpad.dev/~mark/+archive/ppa'179 'http://launchpad.dev/~mark/+archive/ppa'
179180
180This link is not present if the user does not have permission to view181This link is not present if the user does not have permission to view
181the PPA. If we make mark's PPA private and then browse back as182the PPA. We create a private PPA with a published source and then copy
182an anonymous user, the link will be gone.183the source into a public PPA to demonstrate this.
183184
184 >>> admin_browser.open("http://launchpad.dev/~mark/+archive/ppa/+admin")185 >>> login('foo.bar@canonical.com')
185 >>> admin_browser.getControl(name="field.private").value = True186 >>> from lp.registry.interfaces.distribution import IDistributionSet
186 >>> admin_browser.getControl(name="field.buildd_secret").value = "secret"187 >>> ubuntu = getUtility(IDistributionSet).getByName(
187 >>> admin_browser.getControl("Save").click()188 ... 'ubuntu')
189 >>> warty = ubuntu.getSeries('warty')
190 >>> private_ppa = factory.makeArchive(
191 ... name='p3a', private=True, owner=cprov,
192 ... distribution=ubuntu)
193 >>> joe = factory.makePerson(name="joe")
194 >>> public_ppa = factory.makeArchive(
195 ... owner=joe, distribution=ubuntu)
196 >>> from lp.soyuz.tests.test_publishing import SoyuzTestPublisher
197 >>> test_publisher = SoyuzTestPublisher()
198 >>> test_publisher.prepareBreezyAutotest()
199 >>> source = test_publisher.getPubSource(
200 ... sourcename='foo', archive=private_ppa, distroseries=warty)
201 >>> copied_source = source.copyTo(
202 ... source.distroseries, source.pocket, public_ppa)
203 >>> expander_link_id = "pub%s-expander" % copied_source.id
204 >>> logout()
205
206
207We can view the link on the public PPA to Celso's private PPA when logged
208in as Celso.
209
210 >>> cprov_browser = setupBrowser(
211 ... auth="Basic celso.providelo@canonical.com:cprov")
212 >>> cprov_browser.open(
213 ... "http://launchpad.dev/~joe/+archive/ppa/+packages")
214 >>> expander_url = cprov_browser.getLink(id=expander_link_id).url
215 >>> cprov_browser.open(expander_url)
216 >>> print cprov_browser.getLink("PPA named p3a for Celso Providelo").url
217 http://launchpad.dev/~cprov/+archive/p3a
218
219But Joe himself will not see the link.
220
221 >>> joe_browser = setupBrowser(
222 ... auth="Basic joe@example.com:test")
223 >>> joe_browser.open(expander_url)
224 >>> joe_browser.getLink("PPA named p3a for Celso Providelo")
225 Traceback (most recent call last):
226 ...
227 LinkNotFoundError
228
229And neither can an anonymous user.
188230
189 >>> anon_browser.open(expander_url)231 >>> anon_browser.open(expander_url)
190 >>> anon_browser.getLink("PPA for Mark Shuttleworth")232 >>> anon_browser.getLink("PPA named p3a for Celso Providelo")
191 Traceback (most recent call last):233 Traceback (most recent call last):
192 ...234 ...
193 LinkNotFoundError235 LinkNotFoundError
194236
195While we are there, we can also see that Mark's PPA 'repository-size'237While we are there, we can also see that the private PPA's 'repository-size'
196pagelet isn't publicly available once the PPA was marked private.238pagelet isn't publicly available.
197239
198 >>> anon_browser.open(240 >>> anon_browser.open(
199 ... "http://launchpad.dev/~mark/+archive/ppa/+repository-size")241 ... "http://launchpad.dev/~cprov/+archive/p3a/+repository-size")
200 Traceback (most recent call last):242 Traceback (most recent call last):
201 ...243 ...
202 Unauthorized: (..., 'launchpad.View')244 Unauthorized: (..., 'launchpad.View')
203245
204 >>> anon_browser.open(
205 ... "http://launchpad.dev/~cprov/+archive/ppa/+packages")
206
207Set mark's archive back to public before continuing.
208
209 >>> admin_browser.open("http://launchpad.dev/~mark/+archive/ppa/+admin")
210 >>> admin_browser.getControl(name="field.private").value = False
211 >>> admin_browser.getControl(name="field.buildd_secret").value = ""
212 >>> admin_browser.getControl("Save").click()
213
214246
215Searching the packages list247Searching the packages list
216===========================248===========================
@@ -218,6 +250,8 @@
218We can search a PPA for a particular package. A non-existent package shows250We can search a PPA for a particular package. A non-existent package shows
219no results.251no results.
220252
253 >>> anon_browser.open(
254 ... "http://launchpad.dev/~cprov/+archive/ppa/+packages")
221 >>> field = anon_browser.getControl(name='field.name_filter')255 >>> field = anon_browser.getControl(name='field.name_filter')
222 >>> field.value = 'nonexistentpackage'256 >>> field.value = 'nonexistentpackage'
223 >>> anon_browser.getControl('Filter', index=0).click()257 >>> anon_browser.getControl('Filter', index=0).click()
@@ -244,8 +278,6 @@
244 >>> cprov = getUtility(IPersonSet).getByName('cprov')278 >>> cprov = getUtility(IPersonSet).getByName('cprov')
245 >>> iceweasel_pub = cprov.archive.getPublishedSources(279 >>> iceweasel_pub = cprov.archive.getPublishedSources(
246 ... name='iceweasel')[0]280 ... name='iceweasel')[0]
247 >>> from lp.soyuz.tests.test_publishing import SoyuzTestPublisher
248 >>> test_publisher = SoyuzTestPublisher()
249 >>> bpr = test_publisher.uploadBinaryForBuild(281 >>> bpr = test_publisher.uploadBinaryForBuild(
250 ... iceweasel_pub.getBuilds()[0], 'bar-bin')282 ... iceweasel_pub.getBuilds()[0], 'bar-bin')
251 >>> pub_bins = test_publisher.publishBinaryInArchive(283 >>> pub_bins = test_publisher.publishBinaryInArchive(
252284
=== modified file 'lib/lp/soyuz/stories/ppa/xx-private-ppa-presentation.txt'
--- lib/lp/soyuz/stories/ppa/xx-private-ppa-presentation.txt 2009-09-09 20:39:52 +0000
+++ lib/lp/soyuz/stories/ppa/xx-private-ppa-presentation.txt 2010-02-26 15:48:21 +0000
@@ -15,21 +15,24 @@
1515
16== Private presentation ==16== Private presentation ==
1717
18Let's make "cprov's" PPA private. To do this we need to be an18Let's create a private PPA for Celso and see what it looks like.
19admin, and go to his admin page.19
2020 >>> from zope.component import getUtility
21 >>> admin_browser.open("http://launchpad.dev/~cprov/+archive")21 >>> from lp.registry.interfaces.person import IPersonSet
22 >>> admin_browser.getLink("Administer archive").click()22 >>> login('admin@canonical.com')
23 >>> admin_browser.getControl(name="field.private").value = True23 >>> cprov = getUtility(IPersonSet).getByName('cprov')
24 >>> admin_browser.getControl(name="field.buildd_secret").value = "secret"24 >>> from lp.registry.interfaces.distribution import IDistributionSet
25 >>> admin_browser.getControl("Save").click()25 >>> ubuntu = getUtility(IDistributionSet).getByName('ubuntu')
2626 >>> private_ppa = factory.makeArchive(
27When the PPA is marked private it gains the standard Launchpad27 ... owner=cprov, name="p3a", distribution=ubuntu, private=True)
28 >>> logout()
29
30When the PPA is private it gains the standard Launchpad
28presentation for private items.31presentation for private items.
2932
30 >>> cprov_browser = setupBrowser(33 >>> cprov_browser = setupBrowser(
31 ... auth='Basic celso.providelo@canonical.com:cprov')34 ... auth='Basic celso.providelo@canonical.com:cprov')
32 >>> cprov_browser.open("http://launchpad.dev/~cprov/+archive")35 >>> cprov_browser.open("http://launchpad.dev/~cprov/+archive/p3a")
33 >>> from BeautifulSoup import BeautifulSoup, SoupStrainer36 >>> from BeautifulSoup import BeautifulSoup, SoupStrainer
34 >>> body_el = BeautifulSoup(cprov_browser.contents).first('body')37 >>> body_el = BeautifulSoup(cprov_browser.contents).first('body')
35 >>> 'private' in body_el['class']38 >>> 'private' in body_el['class']
3639
=== modified file 'lib/lp/soyuz/stories/ppa/xx-private-ppa-subscription-stories.txt'
--- lib/lp/soyuz/stories/ppa/xx-private-ppa-subscription-stories.txt 2010-02-12 12:39:24 +0000
+++ lib/lp/soyuz/stories/ppa/xx-private-ppa-subscription-stories.txt 2010-02-26 15:48:21 +0000
@@ -31,18 +31,22 @@
3131
32Given a private PPA for Celso,32Given a private PPA for Celso,
3333
34 >>> admin_browser.open("http://launchpad.dev/~cprov/+archive/ppa")34 >>> from zope.component import getUtility
35 >>> admin_browser.getLink("Administer archive").click()35 >>> from lp.registry.interfaces.person import IPersonSet
36 >>> admin_browser.getControl(name="field.private").value = True36 >>> login('admin@canonical.com')
37 >>> admin_browser.getControl(name="field.buildd_secret").value = "secret"37 >>> cprov = getUtility(IPersonSet).getByName('cprov')
38 >>> admin_browser.getControl("Save").click()38 >>> from lp.registry.interfaces.distribution import IDistributionSet
39 >>> ubuntu = getUtility(IDistributionSet).getByName('ubuntu')
40 >>> private_ppa = factory.makeArchive(
41 ... owner=cprov, name="p3a", distribution=ubuntu, private=True)
42 >>> logout()
3943
40and a browser for Celso currently navigated to the Manage Subscriptions page,44and a browser for Celso currently navigated to the Manage Subscriptions page,
4145
42 >>> cprov_browser = setupBrowser(46 >>> cprov_browser = setupBrowser(
43 ... auth="Basic celso.providelo@canonical.com:cprov")47 ... auth="Basic celso.providelo@canonical.com:cprov")
44 >>> cprov_browser.open(48 >>> cprov_browser.open(
45 ... "http://launchpad.dev/~cprov/+archive/ppa/+subscriptions")49 ... "http://launchpad.dev/~cprov/+archive/p3a/+subscriptions")
4650
47and a client of Celso's who has a launchpad name of 'joesmith'51and a client of Celso's who has a launchpad name of 'joesmith'
4852
@@ -51,7 +55,9 @@
51 ... password="test", email="joe@example.com")55 ... password="test", email="joe@example.com")
52 >>> logout()56 >>> logout()
5357
54When Celso fills in the form with 'joesmith' as the subscriber, a blank subscription expiry, a description of "Joe is my friend" and clicks on the "Add subscriber" button,58When Celso fills in the form with 'joesmith' as the subscriber, a blank
59subscription expiry, a description of "Joe is my friend" and clicks on the
60"Add subscriber" button,
5561
56 >>> cprov_browser.getControl(name='field.subscriber').value = 'joesmith'62 >>> cprov_browser.getControl(name='field.subscriber').value = 'joesmith'
57 >>> cprov_browser.getControl(63 >>> cprov_browser.getControl(
@@ -75,7 +81,7 @@
75 >>> for msg in get_feedback_messages(cprov_browser.contents):81 >>> for msg in get_feedback_messages(cprov_browser.contents):
76 ... print msg82 ... print msg
77 You have granted access for Joe Smith to install software from83 You have granted access for Joe Smith to install software from
78 PPA for Celso Providelo. Joe Smith will be notified of the84 PPA named p3a for Celso Providelo. Joe Smith will be notified of the
79 access via email.85 access via email.
8086
8187
@@ -88,7 +94,7 @@
88"Add subscriber" button,94"Add subscriber" button,
8995
90 >>> cprov_browser.open(96 >>> cprov_browser.open(
91 ... "http://launchpad.dev/~cprov/+archive/ppa/+subscriptions")97 ... "http://launchpad.dev/~cprov/+archive/p3a/+subscriptions")
92 >>> cprov_browser.getControl(name='field.subscriber').value = 'launchpad'98 >>> cprov_browser.getControl(name='field.subscriber').value = 'launchpad'
93 >>> cprov_browser.getControl(99 >>> cprov_browser.getControl(
94 ... name='field.date_expires').value = '2200-08-01'100 ... name='field.date_expires').value = '2200-08-01'
@@ -108,7 +114,7 @@
108 >>> for msg in get_feedback_messages(cprov_browser.contents):114 >>> for msg in get_feedback_messages(cprov_browser.contents):
109 ... print msg115 ... print msg
110 You have granted access for Launchpad Developers to install software116 You have granted access for Launchpad Developers to install software
111 from PPA for Celso Providelo. Members of Launchpad Developers117 from PPA named p3a for Celso Providelo. Members of Launchpad Developers
112 will be notified of the access via email.118 will be notified of the access via email.
113119
114== Story 2: An owner edits a subscription for his private archive ==120== Story 2: An owner edits a subscription for his private archive ==
@@ -124,13 +130,13 @@
124navigated to the Manage Subscriptions page,130navigated to the Manage Subscriptions page,
125131
126 >>> cprov_browser.open(132 >>> cprov_browser.open(
127 ... "http://launchpad.dev/~cprov/+archive/ppa/+subscriptions")133 ... "http://launchpad.dev/~cprov/+archive/p3a/+subscriptions")
128134
129when Celso clicks 'Edit/Cancel' for the Launchpad Developers subscription,135when Celso clicks 'Edit/Cancel' for the Launchpad Developers subscription,
130modifies the description field and clicks Update,136modifies the description field and clicks Update,
131137
132 >>> cprov_browser.getLink(138 >>> cprov_browser.getLink(
133 ... url='/~cprov/+archive/ppa/+subscriptions/launchpad/+edit').click()139 ... url='/~cprov/+archive/p3a/+subscriptions/launchpad/+edit').click()
134 >>> cprov_browser.getControl(name="field.description").value = (140 >>> cprov_browser.getControl(name="field.description").value = (
135 ... "a different description")141 ... "a different description")
136 >>> cprov_browser.getControl(name="field.actions.update").click()142 >>> cprov_browser.getControl(name="field.actions.update").click()
@@ -139,7 +145,7 @@
139about the update.145about the update.
140146
141 >>> print cprov_browser.url147 >>> print cprov_browser.url
142 http://launchpad.dev/~cprov/+archive/ppa/+subscriptions148 http://launchpad.dev/~cprov/+archive/p3a/+subscriptions
143 >>> print_archive_subscriptions(cprov_browser.contents)149 >>> print_archive_subscriptions(cprov_browser.contents)
144 Name Expires Comment150 Name Expires Comment
145 Launchpad Developers 2200-08-01 a different description151 Launchpad Developers 2200-08-01 a different description
@@ -155,13 +161,13 @@
155to the Manage Subscriptions page,161to the Manage Subscriptions page,
156162
157 >>> cprov_browser.open(163 >>> cprov_browser.open(
158 ... "http://launchpad.dev/~cprov/+archive/ppa/+subscriptions")164 ... "http://launchpad.dev/~cprov/+archive/p3a/+subscriptions")
159165
160when Celso clicks 'Edit/Cancel' for the Launchpad Developers subscription166when Celso clicks 'Edit/Cancel' for the Launchpad Developers subscription
161and clicks Cancel,167and clicks Cancel,
162168
163 >>> cprov_browser.getLink(169 >>> cprov_browser.getLink(
164 ... url='/~cprov/+archive/ppa/+subscriptions/launchpad/+edit').click()170 ... url='/~cprov/+archive/p3a/+subscriptions/launchpad/+edit').click()
165 >>> cprov_browser.getControl(name="field.actions.cancel").click()171 >>> cprov_browser.getControl(name="field.actions.cancel").click()
166172
167then the browser is redirected back to the subscriptions page, the canceled173then the browser is redirected back to the subscriptions page, the canceled
@@ -169,7 +175,7 @@
169cancellation is displayed.175cancellation is displayed.
170176
171 >>> print cprov_browser.url177 >>> print cprov_browser.url
172 http://launchpad.dev/~cprov/+archive/ppa/+subscriptions178 http://launchpad.dev/~cprov/+archive/p3a/+subscriptions
173 >>> print_archive_subscriptions(cprov_browser.contents)179 >>> print_archive_subscriptions(cprov_browser.contents)
174 Name Expires Comment180 Name Expires Comment
175 Joe Smith Joe is my friend Edit/Cancel181 Joe Smith Joe is my friend Edit/Cancel
@@ -177,7 +183,7 @@
177 >>> for msg in get_feedback_messages(cprov_browser.contents):183 >>> for msg in get_feedback_messages(cprov_browser.contents):
178 ... print msg184 ... print msg
179 You have revoked Launchpad Developers's access to PPA185 You have revoked Launchpad Developers's access to PPA
180 for Celso Providelo.186 named p3a for Celso Providelo.
181187
182188
183== Story 3: A subscriber activates a subscription ==189== Story 3: A subscriber activates a subscription ==
@@ -197,8 +203,8 @@
197 >>> joe_browser.open("http://launchpad.dev/~joesmith")203 >>> joe_browser.open("http://launchpad.dev/~joesmith")
198 >>> joe_browser.getLink('View your private PPA subscriptions').click()204 >>> joe_browser.getLink('View your private PPA subscriptions').click()
199 >>> print_subscriptions_for_person(joe_browser.contents)205 >>> print_subscriptions_for_person(joe_browser.contents)
200 Archive Owner206 Archive Owner
201 PPA for ... Celso Providelo View207 PPA named ... Celso Providelo View
202208
203When Joe clicks on the View button for Celso's PPA then the209When Joe clicks on the View button for Celso's PPA then the
204details of the subscription are displayed with the newly created210details of the subscription are displayed with the newly created
@@ -209,12 +215,12 @@
209 >>> print(extract_text(sources_list))215 >>> print(extract_text(sources_list))
210 Custom sources.list entries216 Custom sources.list entries
211 ...217 ...
212 deb http://joesmith:...@private-ppa.launchpad.dev/cprov/ppa/ubuntu218 deb http://joesmith:...@private-ppa.launchpad.dev/cprov/p3a/ubuntu
213 YOUR_UBUNTU_VERSION_HERE main #Personal access of Joe Smith219 hoary main #Personal access of Joe Smith
214 to PPA for Celso Providelo220 to PPA named p3a for Celso Providelo
215 deb-src http://joesmith:...@private-ppa.launchpad.dev/cprov/ppa/ubuntu221 deb-src http://joesmith:...@private-ppa.launchpad.dev/cprov/p3a/ubuntu
216 YOUR_UBUNTU_VERSION_HERE main #Personal access of Joe Smith222 hoary main #Personal access of Joe Smith
217 to PPA for Celso Providelo223 to PPA named p3a for Celso Providelo
218224
219When Joe navigates back to his current archive subscriptions then the list of225When Joe navigates back to his current archive subscriptions then the list of
220subscriptions reflects the confirmed subscription, providing a normal226subscriptions reflects the confirmed subscription, providing a normal
@@ -223,12 +229,12 @@
223 >>> joe_browser.open(229 >>> joe_browser.open(
224 ... "http://launchpad.dev/~joesmith/+archivesubscriptions")230 ... "http://launchpad.dev/~joesmith/+archivesubscriptions")
225 >>> print_subscriptions_for_person(joe_browser.contents)231 >>> print_subscriptions_for_person(joe_browser.contents)
226 Archive Owner232 Archive Owner
227 PPA for ... Celso Providelo View233 PPA named ... Celso Providelo View
228234
229 >>> joe_browser.getLink('View').click()235 >>> joe_browser.getLink('View').click()
230 >>> print(extract_text(joe_browser.contents))236 >>> print(extract_text(joe_browser.contents))
231 Access to PPA for Celso Providelo...237 Access to PPA named p3a for Celso Providelo...
232238
233=== Scenario 2: A user re-generates the token for a subscription ===239=== Scenario 2: A user re-generates the token for a subscription ===
234240
@@ -254,7 +260,7 @@
254 >>> for msg in get_feedback_messages(joe_browser.contents):260 >>> for msg in get_feedback_messages(joe_browser.contents):
255 ... print msg261 ... print msg
256 Launchpad has generated the new password you requested for your262 Launchpad has generated the new password you requested for your
257 access to the archive PPA for Celso Providelo. Please263 access to the archive PPA named p3a for Celso Providelo. Please
258 follow the instructions below to update your custom "sources.list".264 follow the instructions below to update your custom "sources.list".
259265
260266
@@ -268,7 +274,7 @@
268 >>> from lp.registry.interfaces.person import IPersonSet274 >>> from lp.registry.interfaces.person import IPersonSet
269 >>> cprov = getUtility(IPersonSet).getByName('cprov')275 >>> cprov = getUtility(IPersonSet).getByName('cprov')
270 >>> launchpad = getUtility(IPersonSet).getByName('launchpad')276 >>> launchpad = getUtility(IPersonSet).getByName('launchpad')
271 >>> ignore = cprov.archive.newSubscription(launchpad, cprov)277 >>> ignore = private_ppa.newSubscription(launchpad, cprov)
272 >>> logout()278 >>> logout()
273 >>> login('foo.bar@canonical.com')279 >>> login('foo.bar@canonical.com')
274 >>> foobar = getUtility(IPersonSet).getByName('name16')280 >>> foobar = getUtility(IPersonSet).getByName('name16')
@@ -288,8 +294,8 @@
288294
289 >>> mark_browser.getLink('View your private PPA subscriptions').click()295 >>> mark_browser.getLink('View your private PPA subscriptions').click()
290 >>> print_subscriptions_for_person(mark_browser.contents)296 >>> print_subscriptions_for_person(mark_browser.contents)
291 Archive Owner297 Archive Owner
292 PPA for ... Celso Providelo View298 PPA named ... Celso Providelo View
293299
294When Mark clicks on the view button, then he is taken to the page for300When Mark clicks on the view button, then he is taken to the page for
295his personal subscription for Celso's private PPA and the newly-created301his personal subscription for Celso's private PPA and the newly-created
@@ -300,12 +306,12 @@
300 >>> print(extract_text(sources_list))306 >>> print(extract_text(sources_list))
301 Custom sources.list entries307 Custom sources.list entries
302 ...308 ...
303 deb http://mark:...@private-ppa.launchpad.dev/cprov/ppa/ubuntu309 deb http://mark:...@private-ppa.launchpad.dev/cprov/p3a/ubuntu
304 YOUR_UBUNTU_VERSION_HERE main #Personal access of310 hoary main #Personal access of
305 Mark Shuttleworth to PPA for Celso Providelo311 Mark Shuttleworth to PPA named p3a for Celso Providelo
306 deb-src http://mark:...@private-ppa.launchpad.dev/cprov/ppa/ubuntu312 deb-src http://mark:...@private-ppa.launchpad.dev/cprov/p3a/ubuntu
307 YOUR_UBUNTU_VERSION_HERE main #Personal access of313 hoary main #Personal access of
308 Mark Shuttleworth to PPA for Celso Providelo314 Mark Shuttleworth to PPA named p3a for Celso Providelo
309315
310When Mark navigates back to his current archive subscriptions then the list of316When Mark navigates back to his current archive subscriptions then the list of
311subscriptions reflects the confirmed subscription, providing a normal317subscriptions reflects the confirmed subscription, providing a normal
@@ -314,12 +320,12 @@
314 >>> mark_browser.open(320 >>> mark_browser.open(
315 ... "http://launchpad.dev/~mark/+archivesubscriptions")321 ... "http://launchpad.dev/~mark/+archivesubscriptions")
316 >>> print_subscriptions_for_person(mark_browser.contents)322 >>> print_subscriptions_for_person(mark_browser.contents)
317 Archive Owner323 Archive Owner
318 PPA for ... Celso Providelo View324 PPA named ... Celso Providelo View
319325
320 >>> mark_browser.getLink('View').click()326 >>> mark_browser.getLink('View').click()
321 >>> print(extract_text(mark_browser.contents))327 >>> print(extract_text(mark_browser.contents))
322 Access to PPA for Celso Providelo...328 Access to PPA named p3a for Celso Providelo...
323329
324330
325== Story 4: A user's subscription expires or is cancelled ==331== Story 4: A user's subscription expires or is cancelled ==
326332
=== modified file 'lib/lp/soyuz/stories/ppa/xx-private-ppa-subscriptions.txt'
--- lib/lp/soyuz/stories/ppa/xx-private-ppa-subscriptions.txt 2010-02-11 13:15:30 +0000
+++ lib/lp/soyuz/stories/ppa/xx-private-ppa-subscriptions.txt 2010-02-26 15:48:21 +0000
@@ -28,22 +28,24 @@
28 ... print msg28 ... print msg
29 Only private archives can have subscribers.29 Only private archives can have subscribers.
3030
31Setup both cprov's and mark's PPAs as a private one:31Setup private PPAs for both Celso and Mark:
3232
33 >>> admin_browser.open("http://launchpad.dev/~cprov/+archive/ppa")33 >>> from zope.component import getUtility
34 >>> admin_browser.getLink("Administer archive").click()34 >>> from lp.registry.interfaces.person import IPersonSet
35 >>> admin_browser.getControl(name="field.private").value = True35 >>> login('admin@canonical.com')
36 >>> admin_browser.getControl(name="field.buildd_secret").value = "secret"36 >>> cprov = getUtility(IPersonSet).getByName('cprov')
37 >>> admin_browser.getControl("Save").click()37 >>> mark = getUtility(IPersonSet).getByName('mark')
38 >>> admin_browser.open("http://launchpad.dev/~mark/+archive/ppa")38 >>> from lp.registry.interfaces.distribution import IDistributionSet
39 >>> admin_browser.getLink("Administer archive").click()39 >>> ubuntu = getUtility(IDistributionSet).getByName('ubuntu')
40 >>> admin_browser.getControl(name="field.private").value = True40 >>> cprov_private_ppa = factory.makeArchive(
41 >>> admin_browser.getControl(name="field.buildd_secret").value = "secret"41 ... owner=cprov, name="p3a", distribution=ubuntu, private=True)
42 >>> admin_browser.getControl("Save").click()42 >>> mark_private_ppa = factory.makeArchive(
43 ... owner=mark, name="p3a", distribution=ubuntu, private=True)
44 >>> logout()
4345
44The PPA page includes a link to manage subscriptions:46The PPA page includes a link to manage subscriptions:
4547
46 >>> cprov_browser.open("http://launchpad.dev/~cprov/+archive/ppa")48 >>> cprov_browser.open("http://launchpad.dev/~cprov/+archive/p3a")
47 >>> cprov_browser.getLink("Manage access").click()49 >>> cprov_browser.getLink("Manage access").click()
4850
49The page includes the required dependencies for the yui2-based date51The page includes the required dependencies for the yui2-based date
@@ -62,7 +64,7 @@
6264
63 >>> main_content = find_main_content(cprov_browser.contents)65 >>> main_content = find_main_content(cprov_browser.contents)
64 >>> print extract_text(main_content.find('h1'))66 >>> print extract_text(main_content.find('h1'))
65 Manage access to PPA for Celso Providelo67 Manage access to PPA named p3a for Celso Providelo
6668
67 >>> print extract_text(find_tag_by_id(cprov_browser.contents,69 >>> print extract_text(find_tag_by_id(cprov_browser.contents,
68 ... 'no-subscribers'))70 ... 'no-subscribers'))
@@ -123,7 +125,7 @@
123125
124 >>> mark_browser = setupBrowser(126 >>> mark_browser = setupBrowser(
125 ... auth="Basic mark@example.com:test")127 ... auth="Basic mark@example.com:test")
126 >>> mark_browser.open("http://launchpad.dev/~mark/+archive/ppa/+subscriptions")128 >>> mark_browser.open("http://launchpad.dev/~mark/+archive/p3a/+subscriptions")
127 >>> mark_browser.getControl(name='field.subscriber').value = 'joesmith'129 >>> mark_browser.getControl(name='field.subscriber').value = 'joesmith'
128 >>> mark_browser.getControl(130 >>> mark_browser.getControl(
129 ... name='field.description').value = "Joe is also my friend"131 ... name='field.description').value = "Joe is also my friend"
@@ -138,9 +140,9 @@
138 >>> for row in find_tags_by_class(joe_browser.contents,140 >>> for row in find_tags_by_class(joe_browser.contents,
139 ... 'archive-subscription-row'):141 ... 'archive-subscription-row'):
140 ... print extract_text(row)142 ... print extract_text(row)
141 Archive Owner143 Archive Owner
142 PPA for Mark Shuttleworth (ppa:mark/ppa) Mark Shuttleworth View144 PPA named... (ppa:mark/p3a) Mark Shuttleworth View
143 PPA for Celso Providelo (ppa:cprov/ppa) Celso Providelo View145 PPA named... (ppa:cprov/p3a) Celso Providelo View
144146
145== Confirming a subscription ==147== Confirming a subscription ==
146148
@@ -153,12 +155,12 @@
153 >>> print(extract_text(sources_list))155 >>> print(extract_text(sources_list))
154 Custom sources.list entries156 Custom sources.list entries
155 ...157 ...
156 deb http://joesmith:...@private-ppa.launchpad.dev/mark/ppa/ubuntu158 deb http://joesmith:...@private-ppa.launchpad.dev/mark/p3a/ubuntu
157 breezy-autotest main #Personal access of Joe Smith159 hoary main #Personal access of Joe Smith
158 to PPA for Mark Shuttleworth160 to PPA named p3a for Mark Shuttleworth
159 deb-src http://joesmith:...@private-ppa.launchpad.dev/mark/ppa/ubuntu161 deb-src http://joesmith:...@private-ppa.launchpad.dev/mark/p3a/ubuntu
160 breezy-autotest main #Personal access of Joe Smith162 hoary main #Personal access of Joe Smith
161 to PPA for Mark Shuttleworth163 to PPA named p3a for Mark Shuttleworth
162164
163This page will include information about the signing key, if the archive165This page will include information about the signing key, if the archive
164has a signing key:166has a signing key:
@@ -169,7 +171,7 @@
169 >>> login('foo.bar@canonical.com')171 >>> login('foo.bar@canonical.com')
170 >>> mark = getUtility(IPersonSet).getByName('mark')172 >>> mark = getUtility(IPersonSet).getByName('mark')
171 >>> a_key = getUtility(IGPGKeySet).get(1)173 >>> a_key = getUtility(IGPGKeySet).get(1)
172 >>> mark.archive.signing_key = a_key174 >>> mark_private_ppa.signing_key = a_key
173 >>> logout()175 >>> logout()
174176
175 >>> joe_browser.reload()177 >>> joe_browser.reload()
@@ -177,11 +179,11 @@
177 >>> print(extract_text(sources_list))179 >>> print(extract_text(sources_list))
178 Custom sources.list entries180 Custom sources.list entries
179 ...181 ...
180 deb http://joesmith:...@private-ppa.launchpad.dev/mark/ppa/ubuntu182 deb http://joesmith:...@private-ppa.launchpad.dev/mark/p3a/ubuntu
181 breezy-autotest main #Personal access of Joe Smith183 hoary main #Personal access of Joe Smith
182 to PPA for Mark Shuttleworth184 to PPA named p3a for Mark Shuttleworth
183 deb-src http://joesmith:...@private-ppa.launchpad.dev/mark/ppa/ubuntu185 deb-src http://joesmith:...@private-ppa.launchpad.dev/mark/p3a/ubuntu
184 breezy-autotest main #Personal access of Joe Smith186 hoary main #Personal access of Joe Smith
185 to PPA for Mark Shuttleworth187 to PPA named p3a for Mark Shuttleworth
186 This repository is signed ...188 This repository is signed ...
187189
188190
=== modified file 'lib/lp/soyuz/stories/ppa/xx-private-ppas.txt'
--- lib/lp/soyuz/stories/ppa/xx-private-ppas.txt 2009-09-16 22:57:42 +0000
+++ lib/lp/soyuz/stories/ppa/xx-private-ppas.txt 2010-02-26 15:48:21 +0000
@@ -16,15 +16,17 @@
1616
17== Set Up a Private PPA ==17== Set Up a Private PPA ==
1818
19Let's make "cprov's" PPA private. To do this we need to be an19First we'll create a private PPA for Celso.
20admin, and go to his admin page.20
2121 >>> from zope.component import getUtility
22 >>> admin_browser.open("http://launchpad.dev/~cprov/+archive")22 >>> from lp.registry.interfaces.person import IPersonSet
23 >>> admin_browser.getLink("Administer archive").click()23 >>> login('admin@canonical.com')
24 >>> admin_browser.getControl(name="field.private").value = True24 >>> cprov = getUtility(IPersonSet).getByName('cprov')
25 >>> admin_browser.getControl(name="field.buildd_secret").value = "secret"25 >>> from lp.registry.interfaces.distribution import IDistributionSet
26 >>> admin_browser.getControl("Save").click()26 >>> ubuntu = getUtility(IDistributionSet).getByName('ubuntu')
2727 >>> cprov_private_ppa = factory.makeArchive(
28 ... owner=cprov, name="p3a", distribution=ubuntu, private=True)
29 >>> logout()
2830
29== PPA Listing Page ==31== PPA Listing Page ==
3032
@@ -35,6 +37,7 @@
35 >>> browser.getControl(name="show_inactive").value = True37 >>> browser.getControl(name="show_inactive").value = True
36 >>> browser.getControl('Search', index=0).click()38 >>> browser.getControl('Search', index=0).click()
37 >>> list_ppas_in_browser_page(browser)39 >>> list_ppas_in_browser_page(browser)
40 PPA for Celso Providelo...
38 PPA for Mark Shuttleworth...41 PPA for Mark Shuttleworth...
39 PPA for No Privileges Person...42 PPA for No Privileges Person...
4043
@@ -46,6 +49,7 @@
46 >>> cprov_browser.getControl(name="show_inactive").value = True49 >>> cprov_browser.getControl(name="show_inactive").value = True
47 >>> cprov_browser.getControl('Search', index=0).click()50 >>> cprov_browser.getControl('Search', index=0).click()
48 >>> list_ppas_in_browser_page(cprov_browser)51 >>> list_ppas_in_browser_page(cprov_browser)
52 PPA named p3a for Celso Providelo...
49 PPA for Celso Providelo...53 PPA for Celso Providelo...
50 PPA for Mark Shuttleworth...54 PPA for Mark Shuttleworth...
51 PPA for No Privileges Person...55 PPA for No Privileges Person...
@@ -75,6 +79,7 @@
75 >>> name12_browser.getControl(name="show_inactive").value = True79 >>> name12_browser.getControl(name="show_inactive").value = True
76 >>> name12_browser.getControl('Search', index=0).click()80 >>> name12_browser.getControl('Search', index=0).click()
77 >>> list_ppas_in_browser_page(name12_browser)81 >>> list_ppas_in_browser_page(name12_browser)
82 PPA for Celso Providelo...
78 PPA for Landscape Developers...83 PPA for Landscape Developers...
79 PPA for Mark Shuttleworth...84 PPA for Mark Shuttleworth...
80 PPA for No Privileges Person...85 PPA for No Privileges Person...
@@ -95,7 +100,7 @@
95100
96A non-privileged user cannot access the private PPA pages.101A non-privileged user cannot access the private PPA pages.
97102
98 >>> browser.open("http://launchpad.dev/~cprov/+archive")103 >>> browser.open("http://launchpad.dev/~cprov/+archive/p3a")
99 Traceback (most recent call last):104 Traceback (most recent call last):
100 ...105 ...
101 Unauthorized...106 Unauthorized...
@@ -111,13 +116,14 @@
111 >>> cprov_browser.open("http://launchpad.dev/~cprov/")116 >>> cprov_browser.open("http://launchpad.dev/~cprov/")
112 >>> print_tag_with_id(cprov_browser.contents, 'ppas')117 >>> print_tag_with_id(cprov_browser.contents, 'ppas')
113 Personal package archives118 Personal package archives
119 PPA named p3a for Celso Providelo
114 PPA for Celso Providelo120 PPA for Celso Providelo
115 Create a new PPA121 Create a new PPA
116122
117 >>> cprov_browser.getLink("PPA for Celso Providelo").click()123 >>> cprov_browser.getLink("PPA named p3a for Celso Providelo").click()
118124
119 >>> print cprov_browser.title125 >>> print cprov_browser.title
120 PPA for Celso Providelo : Celso Providelo126 PPA named p3a for Celso Providelo : Celso Providelo
121127
122When a non-privileged user browses to a profile page for a person or128When a non-privileged user browses to a profile page for a person or
123team that has a private PPA for which he is not authorised to see, the129team that has a private PPA for which he is not authorised to see, the
@@ -149,9 +155,9 @@
149Administrators can access all private PPAs.155Administrators can access all private PPAs.
150156
151 >>> admin_browser.open("http://launchpad.dev/~cprov")157 >>> admin_browser.open("http://launchpad.dev/~cprov")
152 >>> admin_browser.getLink("PPA for Celso Providelo").click()158 >>> admin_browser.getLink("PPA named p3a for Celso Providelo").click()
153 >>> admin_browser.url159 >>> admin_browser.url
154 'http://launchpad.dev/~cprov/+archive/ppa'160 'http://launchpad.dev/~cprov/+archive/p3a'
155161
156 >>> admin_browser.open("http://launchpad.dev/~landscape-developers")162 >>> admin_browser.open("http://launchpad.dev/~landscape-developers")
157 >>> admin_browser.getLink("PPA for Landscape Developers").click()163 >>> admin_browser.getLink("PPA for Landscape Developers").click()
158164
=== modified file 'lib/lp/soyuz/stories/soyuz/xx-person-packages.txt'
--- lib/lp/soyuz/stories/soyuz/xx-person-packages.txt 2009-11-09 17:08:21 +0000
+++ lib/lp/soyuz/stories/soyuz/xx-person-packages.txt 2010-02-26 15:48:21 +0000
@@ -169,15 +169,6 @@
169 ... for row in rows:169 ... for row in rows:
170 ... print extract_text(row)170 ... print extract_text(row)
171171
172And another helper function to set the private flag on a PPA:
173
174 >>> def set_private(name, private=True):
175 ... admin_browser.open("http://launchpad.dev/~%s/+archive/ppa" % (
176 ... name))
177 ... admin_browser.getLink("Administer archive").click()
178 ... admin_browser.getControl(name="field.private").value = private
179 ... admin_browser.getControl(name="field.buildd_secret").value = "x"
180 ... admin_browser.getControl("Save").click()
181172
182Create some new source packages, source1 and source2, both created by cprov173Create some new source packages, source1 and source2, both created by cprov
183so that they appear in his +packages page.174so that they appear in his +packages page.
@@ -186,6 +177,7 @@
186 >>> from canonical.launchpad.ftests import login, logout177 >>> from canonical.launchpad.ftests import login, logout
187 >>> from canonical.database.sqlbase import flush_database_updates178 >>> from canonical.database.sqlbase import flush_database_updates
188 >>> from canonical.launchpad.interfaces import IPersonSet179 >>> from canonical.launchpad.interfaces import IPersonSet
180 >>> from lp.registry.interfaces.distribution import IDistributionSet
189 >>> from lp.soyuz.tests.test_publishing import (181 >>> from lp.soyuz.tests.test_publishing import (
190 ... SoyuzTestPublisher)182 ... SoyuzTestPublisher)
191 >>> from lp.soyuz.interfaces.publishing import (183 >>> from lp.soyuz.interfaces.publishing import (
@@ -194,6 +186,9 @@
194 >>> login("foo.bar@canonical.com")186 >>> login("foo.bar@canonical.com")
195 >>> cprov = getUtility(IPersonSet).getByName('cprov')187 >>> cprov = getUtility(IPersonSet).getByName('cprov')
196 >>> nopriv = getUtility(IPersonSet).getByName('no-priv')188 >>> nopriv = getUtility(IPersonSet).getByName('no-priv')
189 >>> ubuntu = getUtility(IDistributionSet).getByName('ubuntu')
190 >>> nopriv_private_ppa = factory.makeArchive(
191 ... owner=nopriv, name="p3a", distribution=ubuntu, private=True)
197 >>> mark = getUtility(IPersonSet).getByName('mark')192 >>> mark = getUtility(IPersonSet).getByName('mark')
198 >>> test_publisher = SoyuzTestPublisher()193 >>> test_publisher = SoyuzTestPublisher()
199 >>> test_publisher.prepareBreezyAutotest()194 >>> test_publisher.prepareBreezyAutotest()
@@ -207,14 +202,14 @@
207 >>> source2 = test_publisher.getPubSource(202 >>> source2 = test_publisher.getPubSource(
208 ... status=PackagePublishingStatus.PUBLISHED,203 ... status=PackagePublishingStatus.PUBLISHED,
209 ... sourcename='source2',204 ... sourcename='source2',
210 ... archive=nopriv.archive)205 ... archive=nopriv_private_ppa)
211 >>> source2.sourcepackagerelease.creator=cprov206 >>> source2.sourcepackagerelease.creator=cprov
212207
213 >>> flush_database_updates()208 >>> flush_database_updates()
214 >>> logout()209 >>> logout()
215210
216"source1" is now published in cprov and mark's PPA. "source2" is only211"source1" is now published in cprov and mark's PPA. "source2" is only
217published in no-priv's PPA.212published in no-priv's Private PPA.
218213
219Make user_browser a known user that does not conflict with "no-priv":214Make user_browser a known user that does not conflict with "no-priv":
220215
@@ -222,23 +217,14 @@
222217
223=== Cprov's +related-software page ===218=== Cprov's +related-software page ===
224219
225So let's look at cprov's +related-software page which has two entries in220For unprivileged users, cprov's displayed PPA packages only display
226the PPA section:221the one in his own public PPA because source2 is only published
227222in the private PPA of the "no-priv" user.
228 >>> user_browser.open("http://launchpad.dev/~cprov/+related-software")223
229 >>> print_ppa_rows(user_browser)224XXX Michael Nelson 2010-02-26 bug=394276: The following should be
230 source1 PPA for Celso Providelo - Ubuntutest Breezy-autotest 666225a view test of PersonPPAPAckagesView.filterPPAPackageList(). They
231 ...ago None - -226are not always testing what we think they are, as the lines match
232 source2 PPA for No Privileges Person - Ubuntutest Breezy-autotest 666227more packages than intended.
233 ...ago None - -
234
235Now, let's make the PPA for "No Privileges Person" private:
236
237 >>> set_private("no-priv")
238
239For unprivileged users, cprov's displayed PPA packages are now reduced
240to the one in his own PPA because the other iceweasel is only published
241in the newly-private PPA of the "no-priv" user.
242228
243The logged-in user's case:229The logged-in user's case:
244230
@@ -262,20 +248,26 @@
262 >>> print_ppa_rows(nopriv_browser)248 >>> print_ppa_rows(nopriv_browser)
263 source1 PPA for Celso Providelo - Ubuntutest Breezy-autotest 666249 source1 PPA for Celso Providelo - Ubuntutest Breezy-autotest 666
264 ...ago None - -250 ...ago None - -
265 source2 PPA for No Priv... Person - Ubuntutest Breezy-autotest 666251 source2 PPA named p3a for No Priv... Ubuntutest Breezy-autotest 666
266 ...ago None - -252 ...ago None - -
267253
268 >>> admin_browser.open("http://launchpad.dev/~cprov/+related-software")254 >>> admin_browser.open("http://launchpad.dev/~cprov/+related-software")
269 >>> print_ppa_rows(admin_browser)255 >>> print_ppa_rows(admin_browser)
270 source1 PPA for Celso Providelo - Ubuntutest Breezy-autotest 666256 source1 PPA for Celso Providelo - Ubuntutest Breezy-autotest 666
271 ...ago None - -257 ...ago None - -
272 source2 PPA for No Priv... Person - Ubuntutest Breezy-autotest 666258 source2 PPA named p3a for No Priv... Ubuntutest Breezy-autotest 666
273 ...ago None - -259 ...ago None - -
274260
275Let's make mark's archive private and view the page again.261Let's move the publication of source1 from mark's public archive to his
276262private one and the view the page again.
277 >>> set_private("mark")263
278264 >>> login('admin@canonical.com')
265 >>> mark_private_ppa = factory.makeArchive(
266 ... owner=mark, name="p3a", distribution=ubuntu, private=True)
267 >>> from zope.security.proxy import removeSecurityProxy
268 >>> removeSecurityProxy(source1_mark.secure_record).archive = (
269 ... mark_private_ppa)
270 >>> logout()
279 >>> user_browser.open("http://launchpad.dev/~cprov/+related-software")271 >>> user_browser.open("http://launchpad.dev/~cprov/+related-software")
280 >>> print_ppa_rows(user_browser)272 >>> print_ppa_rows(user_browser)
281 source1 PPA for Celso Providelo - Ubuntutest Breezy-autotest 666273 source1 PPA for Celso Providelo - Ubuntutest Breezy-autotest 666
@@ -286,13 +278,20 @@
286 source1 PPA for Celso Providelo - Ubuntutest Breezy-autotest 666278 source1 PPA for Celso Providelo - Ubuntutest Breezy-autotest 666
287 ...ago None - -279 ...ago None - -
288280
289Notice that the source1 package in mark's PPA is still appearing281Notice that the source1 package is still appearing because it is also
290because it is also published in some non-private archives, which282published in some non-private archives, which override the private nature
291override the private nature of mark's archive.283of mark's archive.
292284
293Let's make cprov's archive private:285Let's move the publication of source1 from cprov's public archive to
294286his private one:
295 >>> set_private("cprov")287
288 >>> login('admin@canonical.com')
289 >>> cprov_private_ppa = factory.makeArchive(
290 ... owner=cprov, name="p3a", distribution=ubuntu, private=True)
291 >>> removeSecurityProxy(source1.secure_record).archive = (
292 ... cprov_private_ppa)
293 >>> source1.sourcepackagerelease.upload_archive = cprov_private_ppa
294 >>> logout()
296295
297It will now disppear from the listings because it's not published in any296It will now disppear from the listings because it's not published in any
298public archives.297public archives.
@@ -320,12 +319,12 @@
320319
321 >>> user_browser.open("http://launchpad.dev/~cprov/+related-software")320 >>> user_browser.open("http://launchpad.dev/~cprov/+related-software")
322 >>> print_ppa_rows(user_browser)321 >>> print_ppa_rows(user_browser)
323 source1 PPA for Celso Providelo - Ubuntutest Breezy-autotest 666322 source1 PPA named p3a for Celso... - Ubuntutest Breezy-autotest 666
324 ...ago None - -323 ...ago None - -
325324
326 >>> anon_browser.open("http://launchpad.dev/~cprov/+related-software")325 >>> anon_browser.open("http://launchpad.dev/~cprov/+related-software")
327 >>> print_ppa_rows(anon_browser)326 >>> print_ppa_rows(anon_browser)
328 source1 PPA for Celso Providelo - Ubuntutest Breezy-autotest 666327 source1 PPA named p3a for Celso... - Ubuntutest Breezy-autotest 666
329 ...ago None - -328 ...ago None - -
330329
331Even after the package is superseded, the package remains visibile in330Even after the package is superseded, the package remains visibile in
@@ -338,12 +337,12 @@
338337
339 >>> user_browser.open("http://launchpad.dev/~cprov/+related-software")338 >>> user_browser.open("http://launchpad.dev/~cprov/+related-software")
340 >>> print_ppa_rows(user_browser)339 >>> print_ppa_rows(user_browser)
341 source1 PPA for Celso Providelo - Ubuntutest Breezy-autotest 666340 source1 PPA named p3a for Celso... - Ubuntutest Breezy-autotest 666
342 ...ago None - -341 ...ago None - -
343342
344 >>> anon_browser.open("http://launchpad.dev/~cprov/+related-software")343 >>> anon_browser.open("http://launchpad.dev/~cprov/+related-software")
345 >>> print_ppa_rows(anon_browser)344 >>> print_ppa_rows(anon_browser)
346 source1 PPA for Celso Providelo - Ubuntutest Breezy-autotest 666345 source1 PPA named p3a for Celso... - Ubuntutest Breezy-autotest 666
347 ...ago None - -346 ...ago None - -
348347
349348
@@ -358,15 +357,15 @@
358357
359 >>> admin_browser.open("http://launchpad.dev/~cprov/+related-software")358 >>> admin_browser.open("http://launchpad.dev/~cprov/+related-software")
360 >>> print_ppa_rows(admin_browser)359 >>> print_ppa_rows(admin_browser)
361 source1 PPA for Celso Providelo - Ubuntutest Breezy-autotest 666360 source1 PPA named p3a for Celso... - Ubuntutest Breezy-autotest 666
362 ...ago None - -361 ...ago None - -
363 source2 PPA for No Priv... Person - Ubuntutest Breezy-autotest 666362 source2 PPA named p3a for No Priv... - Ubuntutest Breezy-autotest 666
364 ...ago None - -363 ...ago None - -
365364
366Then delete the 'source2' package.365Then delete the 'source2' package.
367366
368 >>> admin_browser.open(367 >>> admin_browser.open(
369 ... "http://launchpad.dev/~no-priv/+archive/ppa/+delete-packages")368 ... "http://launchpad.dev/~no-priv/+archive/p3a/+delete-packages")
370 >>> admin_browser.getControl(369 >>> admin_browser.getControl(
371 ... name='field.selected_sources').value = ['%s' % source2.id]370 ... name='field.selected_sources').value = ['%s' % source2.id]
372 >>> admin_browser.getControl(371 >>> admin_browser.getControl(
@@ -394,8 +393,8 @@
394393
395 >>> admin_browser.open("http://launchpad.dev/~cprov/+related-software")394 >>> admin_browser.open("http://launchpad.dev/~cprov/+related-software")
396 >>> print_ppa_rows(admin_browser)395 >>> print_ppa_rows(admin_browser)
397 source1 PPA for Celso Providelo - Ubuntutest Breezy-autotest 666396 source1 PPA named p3a for Celso... - Ubuntutest Breezy-autotest 666
398 ...ago None - -397 ...ago None - -
399 source2 PPA for No Priv... Person - Ubuntutest Breezy-autotest 666398 source2 PPA named p3a for No Priv... - Ubuntutest Breezy-autotest 666
400 ...ago None - -399 ...ago None - -
401400