Merge lp:~cjwatson/launchpad/product-projectgroup into lp:launchpad

Proposed by Colin Watson
Status: Merged
Approved by: Colin Watson
Approved revision: no longer in the source branch.
Merged at revision: 17327
Proposed branch: lp:~cjwatson/launchpad/product-projectgroup
Merge into: lp:launchpad
Diff against target: 313 lines (+42/-41)
10 files modified
lib/lp/bugs/mail/tests/test_commands.py (+2/-2)
lib/lp/registry/doc/karmacontext.txt (+13/-12)
lib/lp/registry/doc/launchpad-container.txt (+3/-3)
lib/lp/registry/doc/product-widgets.txt (+4/-4)
lib/lp/registry/doc/product.txt (+8/-8)
lib/lp/registry/templates/milestone-index.pt (+3/-3)
lib/lp/registry/templates/sourcepackage-upstream-connections.pt (+2/-2)
lib/lp/translations/browser/tests/test_noindex.py (+1/-1)
lib/lp/translations/stories/standalone/xx-translation-access-display.txt (+4/-4)
lib/lp/translations/templates/pofile-portlet-details.pt (+2/-2)
To merge this branch: bzr merge lp:~cjwatson/launchpad/product-projectgroup
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Review via email: mp+248035@code.launchpad.net

Commit message

Fix test failures due to renaming of Product.project to Product.projectgroup.

Description of the change

Fix test failures due to renaming of Product.project to Product.projectgroup.

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/bugs/mail/tests/test_commands.py'
2--- lib/lp/bugs/mail/tests/test_commands.py 2012-09-17 16:13:40 +0000
3+++ lib/lp/bugs/mail/tests/test_commands.py 2015-01-29 18:51:54 +0000
4@@ -74,9 +74,9 @@
5 login_person(owner)
6 project_group = self.factory.makeProject(name='fnord', owner=owner)
7 project_1 = self.factory.makeProduct(name='pting', owner=owner)
8- project_1.project = project_group
9+ project_1.projectgroup = project_group
10 project_2 = self.factory.makeProduct(name='snarf', owner=owner)
11- project_2.project = project_group
12+ project_2.projectgroup = project_group
13 message = (
14 "fnord is a group of projects. To report a bug, you need to "
15 "specify which of these projects the bug applies to: "
16
17=== modified file 'lib/lp/registry/doc/karmacontext.txt'
18--- lib/lp/registry/doc/karmacontext.txt 2012-12-26 01:32:19 +0000
19+++ lib/lp/registry/doc/karmacontext.txt 2015-01-29 18:51:54 +0000
20@@ -3,9 +3,9 @@
21
22 Now that we track the Product/Distribution in which a given karma-giving
23 action was performed, we're able to find out who contributes the most to a
24-given product/project/distribution. We can have this on a per-category
25-(Bug Management, Translations, etc) basis or in general, across all
26-categories.
27+given product/project group/distribution. We can have this on a
28+per-category (Bug Management, Translations, etc) basis or in general, across
29+all categories.
30
31 >>> import operator
32 >>> from zope.component import getUtility
33@@ -22,7 +22,7 @@
34 True
35 >>> verifyObject(IKarmaContext, ubuntu)
36 True
37- >>> verifyObject(IKarmaContext, firefox.project)
38+ >>> verifyObject(IKarmaContext, firefox.projectgroup)
39 True
40
41 >>> [(person.name, karmavalue)
42@@ -41,7 +41,7 @@
43 [(u'mark', 27)]
44
45 We also have a way of retrieving the top contributors of a given
46-product/project/distribution grouped by categories.
47+product/project group/distribution grouped by categories.
48
49 >>> contributors = ubuntu.getTopContributorsGroupedByCategory(limit=2)
50 >>> sorted_categories = sorted(contributors.keys(),
51@@ -53,15 +53,16 @@
52 Bug Management: [(u'name16', 26), (u'name12', 13)]
53 Specification Tracking: [(u'mark', 37)]
54
55-The top contributors of a project are the ones with the most karma in all
56-products of that project.
57+The top contributors of a project group are the ones with the most karma in
58+all products of that project group.
59
60-Note that Foo Bar's karma on the mozilla project is the sum of Foo Bar's
61-karma on the firefox and thunderbird products, which are both part of
62-the mozilla project.
63+Note that Foo Bar's karma on the mozilla project group is the sum of Foo
64+Bar's karma on the firefox and thunderbird products, which are both part of
65+the mozilla project group.
66
67 >>> [(person.name, karmavalue)
68- ... for person, karmavalue in firefox.project.getTopContributors(limit=3)]
69+ ... for person, karmavalue
70+ ... in firefox.projectgroup.getTopContributors(limit=3)]
71 [(u'name12', 66), (u'mark', 27), (u'name16', 23)]
72
73 >>> [(person.name, karmavalue)
74@@ -69,7 +70,7 @@
75 [(u'name12', 66), (u'mark', 27), (u'name16', 8)]
76
77 >>> thunderbird = getUtility(IProductSet).getByName('thunderbird')
78- >>> thunderbird.project == firefox.project
79+ >>> thunderbird.projectgroup == firefox.projectgroup
80 True
81 >>> [(person.name, karmavalue)
82 ... for person, karmavalue in thunderbird.getTopContributors(limit=3)]
83
84=== modified file 'lib/lp/registry/doc/launchpad-container.txt'
85--- lib/lp/registry/doc/launchpad-container.txt 2012-12-26 01:32:19 +0000
86+++ lib/lp/registry/doc/launchpad-container.txt 2015-01-29 18:51:54 +0000
87@@ -13,14 +13,14 @@
88 >>> from lp.registry.interfaces.distribution import (
89 ... IDistributionSet)
90 >>> firefox = getUtility(IProductSet)['firefox']
91- >>> mozilla = firefox.project
92+ >>> mozilla = firefox.projectgroup
93 >>> ubuntu = getUtility(IDistributionSet)['ubuntu']
94 >>> evolution = ubuntu.getSourcePackage('evolution')
95
96 The ILaunchpadContainer defines only the isWithin(context) method, which
97 returns True if this context is the given one or is within it.
98
99-A product is within itself or its project.
100+A product is within itself or its project group.
101
102 >>> ILaunchpadContainer(firefox).isWithin(firefox)
103 True
104@@ -31,7 +31,7 @@
105 >>> verifyObject(ILaunchpadContainer, ILaunchpadContainer(firefox))
106 True
107
108-A project is only within itself.
109+A project group is only within itself.
110
111 >>> ILaunchpadContainer(mozilla).isWithin(mozilla)
112 True
113
114=== modified file 'lib/lp/registry/doc/product-widgets.txt'
115--- lib/lp/registry/doc/product-widgets.txt 2012-12-16 23:23:52 +0000
116+++ lib/lp/registry/doc/product-widgets.txt 2015-01-29 18:51:54 +0000
117@@ -39,7 +39,7 @@
118
119 Firefox has not yet selected a bug tracker.
120
121- >>> print firefox.project.bugtracker
122+ >>> print firefox.projectgroup.bugtracker
123 None
124
125 >>> from BeautifulSoup import BeautifulSoup, Tag
126@@ -69,7 +69,7 @@
127
128 >>> gnome_bugzilla = tracker_set.getByName('gnome-bugzilla')
129 >>> login('foo.bar@canonical.com')
130- >>> firefox.project.bugtracker = gnome_bugzilla
131+ >>> firefox.projectgroup.bugtracker = gnome_bugzilla
132
133 >>> print_items(widget())
134 [ ] In Launchpad
135@@ -79,8 +79,8 @@
136
137 On second thought, Firefox has no specified bug tracker.
138
139- >>> old_firefox_project = firefox.project
140- >>> firefox.project = None
141+ >>> old_firefox_projectgroup = firefox.projectgroup
142+ >>> firefox.projectgroup = None
143
144 >>> print_items(widget())
145 [ ] In Launchpad
146
147=== modified file 'lib/lp/registry/doc/product.txt'
148--- lib/lp/registry/doc/product.txt 2013-05-01 21:23:16 +0000
149+++ lib/lp/registry/doc/product.txt 2015-01-29 18:51:54 +0000
150@@ -222,7 +222,7 @@
151
152 If a product doesn't use Malone, it can specify that it uses an
153 external bug tracker. It can either use its own bug tracker, or use its
154-project's bug tracker. In order to make this logic easier for call
155+project group's bug tracker. In order to make this logic easier for call
156 sites, there is a method that takes care of it called
157 getExternalBugTracker.
158
159@@ -238,18 +238,18 @@
160 >>> firefox.getExternalBugTracker() is None
161 True
162
163-This is true even if its project has a bug tracker specified.
164+This is true even if its project group has a bug tracker specified.
165
166 >>> from lp.bugs.interfaces.bugtracker import IBugTrackerSet
167
168 >>> ignored = login_person(firefox.owner)
169 >>> bug_tracker_set = getUtility(IBugTrackerSet)
170 >>> gnome_bugzilla = bug_tracker_set.getByName('gnome-bugzilla')
171- >>> firefox.project.bugtracker = gnome_bugzilla
172+ >>> firefox.projectgroup.bugtracker = gnome_bugzilla
173 >>> firefox.getExternalBugTracker() is None
174 True
175
176-Now, if we say that Firefox doesn't use Malone, its project's bug
177+Now, if we say that Firefox doesn't use Malone, its project group's bug
178 tracker will be returned.
179
180 >>> firefox.official_malone = False
181@@ -261,7 +261,7 @@
182 u'gnome-bugzilla'
183
184
185-If Firefox isn't happy with its project's bug tracker it can choose to
186+If Firefox isn't happy with its project group's bug tracker it can choose to
187 specify its own.
188
189 >>> debbugs = getUtility(IBugTrackerSet).getByName('debbugs')
190@@ -272,10 +272,10 @@
191 EXTERNAL
192
193
194-If neither the project nor the product have specified a bug tracker,
195+If neither the project group nor the product have specified a bug tracker,
196 None will of course be returned.
197
198- >>> firefox.project.bugtracker = None
199+ >>> firefox.projectgroup.bugtracker = None
200 >>> firefox.bugtracker = None
201 >>> firefox.getExternalBugTracker() is None
202 True
203@@ -392,7 +392,7 @@
204 >>> [milestone.name for milestone in firefox.milestones]
205 [u'1.0']
206
207-Milestones for products can only be created by product/project owners,
208+Milestones for products can only be created by product/project group owners,
209 registry experts, or admins.
210
211 >>> from datetime import datetime
212
213=== modified file 'lib/lp/registry/templates/milestone-index.pt'
214--- lib/lp/registry/templates/milestone-index.pt 2012-10-04 20:38:22 +0000
215+++ lib/lp/registry/templates/milestone-index.pt 2015-01-29 18:51:54 +0000
216@@ -317,11 +317,11 @@
217 milestones for
218 <tal:project replace="view/milestone/target/displayname" /></a>
219 </li>
220- <li tal:condition="view/milestone/target/project|nothing">
221+ <li tal:condition="view/milestone/target/projectgroup|nothing">
222 <a class="sprite info"
223- tal:attributes="href view/milestone/target/project/menu:overview/milestones/fmt:url">View
224+ tal:attributes="href view/milestone/target/projectgroup/menu:overview/milestones/fmt:url">View
225 milestones for
226- <tal:project replace="view/milestone/target/project/displayname" /></a>
227+ <tal:project replace="view/milestone/target/projectgroup/displayname" /></a>
228 </li>
229 <li tal:condition="view/milestone/series_target|nothing">
230 <a class="sprite info"
231
232=== modified file 'lib/lp/registry/templates/sourcepackage-upstream-connections.pt'
233--- lib/lp/registry/templates/sourcepackage-upstream-connections.pt 2010-11-18 20:50:00 +0000
234+++ lib/lp/registry/templates/sourcepackage-upstream-connections.pt 2015-01-29 18:51:54 +0000
235@@ -11,8 +11,8 @@
236 <div id="upstreams" tal:define="series context/productseries">
237 <dl>
238 <dd>
239- <tal:has_pg condition="series/product/project">
240- <a tal:replace="structure series/product/project/fmt:link" /> &rArr;
241+ <tal:has_pg condition="series/product/projectgroup">
242+ <a tal:replace="structure series/product/projectgroup/fmt:link" /> &rArr;
243 </tal:has_pg>
244 <a tal:replace="structure series/product/fmt:link" /> &rArr;
245 <a tal:content="series/name"
246
247=== modified file 'lib/lp/translations/browser/tests/test_noindex.py'
248--- lib/lp/translations/browser/tests/test_noindex.py 2012-10-09 10:28:02 +0000
249+++ lib/lp/translations/browser/tests/test_noindex.py 2015-01-29 18:51:54 +0000
250@@ -106,7 +106,7 @@
251 self.factory.makePOTemplate(
252 productseries=self.product.development_focus)
253 self.naked_translatable = removeSecurityProxy(self.product)
254- self.naked_translatable.project = self.target
255+ self.naked_translatable.projectgroup = self.target
256
257
258 class TestRobotsProductSeries(BrowserTestCase, TestRobotsMixin):
259
260=== modified file 'lib/lp/translations/stories/standalone/xx-translation-access-display.txt'
261--- lib/lp/translations/stories/standalone/xx-translation-access-display.txt 2011-12-30 06:14:56 +0000
262+++ lib/lp/translations/stories/standalone/xx-translation-access-display.txt 2015-01-29 18:51:54 +0000
263@@ -33,7 +33,7 @@
264
265 == Displaying translation groups and reviewers ==
266
267-Evolution is part of the Gnome project, and when Gnome sets a
268+Evolution is part of the Gnome project group, and when Gnome sets a
269 translation group of its own, that too is shown here.
270
271 >>> import re
272@@ -51,7 +51,7 @@
273 >>> gnomegroup = TranslationGroup(name='gnomegroup',
274 ... title="Gnome translation group", summary="Testing group",
275 ... datecreated=UTC_NOW, owner=foobar)
276- >>> evolution.project.translationgroup = gnomegroup
277+ >>> evolution.projectgroup.translationgroup = gnomegroup
278
279 >>> admin_browser.open(
280 ... 'http://translations.launchpad.dev/'
281@@ -62,7 +62,7 @@
282
283 If the two groups are identical, however, it is only listed once.
284
285- >>> evolution.project.translationgroup = evolution.translationgroup
286+ >>> evolution.projectgroup.translationgroup = evolution.translationgroup
287
288 >>> admin_browser.open(
289 ... 'http://translations.launchpad.dev/'
290@@ -76,7 +76,7 @@
291
292 >>> original_translation_group = evolution.translationgroup
293 >>> evolution.translationgroup = None
294- >>> evolution.project.translationgroup = None
295+ >>> evolution.projectgroup.translationgroup = None
296
297 >>> admin_browser.open(
298 ... 'http://translations.launchpad.dev/'
299
300=== modified file 'lib/lp/translations/templates/pofile-portlet-details.pt'
301--- lib/lp/translations/templates/pofile-portlet-details.pt 2012-07-06 06:02:33 +0000
302+++ lib/lp/translations/templates/pofile-portlet-details.pt 2015-01-29 18:51:54 +0000
303@@ -34,8 +34,8 @@
304 tal:attributes="href product/translationgroup/fmt:url"
305 >Ubuntu Translation Group</a><br />
306 </tal:has_prod_translationgrp>
307- <tal:has_project_group condition="product/project"
308- define="projectgroup product/project">
309+ <tal:has_project_group condition="product/projectgroup"
310+ define="projectgroup product/projectgroup">
311 <b>Project group:</b>
312 <a tal:content="projectgroup/displayname"
313 tal:attributes="href string:/${projectgroup/name}/" /><br />